CVE-2026-82531GHSA-3w63-v7pm-cq9x
Smarty before 4.5.8 and 5.x before 5.8.5 PHP Code Injection via extends: Inheritance Cache
smarty-php smartyRuntimes & languages
CVSS
9.2CriticalExploitationPublic exploit codeCISA's assessment says proof of concept code is public, assessed 6 Oct 2026. Not in the KEV catalogCISA via CVE List
Exploit odds (EPSS)0.82%Chance of exploitation activity in the next 30 days, higher than 56% of CVEs. Scored 23 Oct 2026FIRST EPSS
What fixes it
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
Smarty before 4.5.8 and 5.x before 5.8.5 contains a code injection vulnerability where the top-level nocache_hash 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.
Text from CVE List
Affected versions 4
- smartyaffected: all versions before 4.5.8CVE List
- smartyaffected: 5.0.0 before 5.8.5CVE List
- smartyunaffected: 4.5.8CVE List
- smartyunaffected: 5.8.5CVE List
References 6
- github.com/smarty-php/smarty/commit/c0fdd4824aca4f67e814b50703cfee1dfde41414Fixvia CVE List
- github.com/smarty-php/smarty/commit/1cba51cb813563eb61d963c83d28cd59f26b858dFixvia CVE List
- github.com/smarty-php/smarty/releases/tag/v5.8.5Fixvia CVE List
- github.com/smarty-php/smarty/releases/tag/v4.5.8Fixvia CVE List
- vulncheck.com/advisories/smarty-before-4.5.8-and-5-x-before-5.8.5-php-code-injection-via-extends-inheritance-cacheAdvisoryvia CVE List
- github.com/smarty-php/smarty/security/advisories/GHSA-3w63-v7pm-cq9xExploitvia CVE List