Paper/Archive/CVE-2026-82531

CVE-2026-82531

smarty-php smarty — Smarty before 4.5.8 and 5.x before 5.8.5 PHP Code Injection via extends: Inheritance Cache

Description · from the CVE record

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.

Affected

ProductAffectedFixed inSource
smarty< 4.5.84.5.8CNA
smarty5.0.0 – < 5.8.55.8.5CNA

Scores by source

VulnCheck (CNA)9.2CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
VulnCheck (CNA)8.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
CISA ADPSSVCExploitation: poc · Automatable: no · Technical impact: total

References

exploitgithub.com/smarty-php/smarty/security/advisories/GHSA-3w63-v7pm-cq9xpatchgithub.com/smarty-php/smarty/commit/c0fdd4824aca4f67e814b50703cfee1dfde41414patchgithub.com/smarty-php/smarty/commit/1cba51cb813563eb61d963c83d28cd59f26b858drefgithub.com/smarty-php/smarty/releases/tag/v5.8.5refgithub.com/smarty-php/smarty/releases/tag/v4.5.8writeupvulncheck.com/advisories/smarty-before-4.5.8-and-5-x-before-5.8.5-php-code-injection-via-extends-inheritance-cache