CVE-2026-82531: Smarty before 4.5.8 and 5.x before 5.8.5 PHP Code Injection via extends: Inheritance Cache

Published Oct 6, 2026
·
Updated

Smarty before 4.5.8 and 5.x before 5.8.5 contains a code injection vulnerability where the top-level nocachehash is never restored during extends:/multi-component template inheritance, leaving it null. Attackers can supply assigned data containing a forged SmartyNocache marker that is copied verbatim into the regenerated PHP cache file, executing arbitrary PHP on include for remote code execution.

Affected Software

1 affected component
Smarty smarty<4.5.8, >=5.0.0<5.8.5

Event History

Oct 6, 2026
CVE Published
via MITRE·12:18 PM
Data Sourced
via MITRE·12:18 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·01:16 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which Smarty versions need to be remediated?

Smarty versions before 4.5.8 are affected, as are 5.x versions before 5.8.5. Upgrade to 4.5.8 or later in the 4.x line, or to 5.8.5 or later in the 5.x line.

2

What conditions are required for exploitation?

An attacker must be able to supply assigned template data containing a forged SmartyNocache marker. Exploitation also relies on extends: or multi-component template inheritance causing regeneration of a PHP cache file that is later included.

3

What is the impact if exploitation succeeds?

The forged marker can be copied verbatim into a regenerated PHP cache file. When that file is included, the injected PHP executes, resulting in remote code execution with the privileges of the PHP process.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203