CVE-2026-82531: Smarty before 4.5.8 and 5.x before 5.8.5 PHP Code Injection via extends: Inheritance Cache
Vulnerability summary
CVE-2026-82531 is a critical (CVSS 9.2) Improper Control of Generation of Code vulnerability in smarty-php smarty. EPSS estimates a 0.82% chance of exploitation in the next 30 days, higher than 58.6% of scored vulnerabilities.
Severe, CVSS 9.2 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 1% (FIRST, 05-12-2026)
CIRCL last checked 05-12-2026
Source freshness unavailable
How is this decided?Timeline
- 06-10-2026PublishedVulnerability first disclosed.
- 06-10-2026Last modifiedVulnerability information updated.
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.
CVSS metrics
7 scores · 4 sources · 2 versions- OSV · UbuntuEcosystem advisory · calculated9.2CriticalCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- NVDNIST9.2CriticalCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- OSV · UbuntuEcosystem advisory · calculated8.1HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated8.1HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- NVDNIST8.1HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
0.82%
Chance of exploitation in the next 30 days
Percentile
59%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.82% on 05-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Debian2 products
- smarty3All versions (No fix recorded)
- smarty4All versions (No fix recorded) | < 4.5.5-1+deb13u1 | < 4.5.8-1
Ubuntu2 products
- smarty3All versions (No fix recorded)
- smarty4All versions (No fix recorded)
Mageia1 product
- php-smarty< 5.8.5-1.mga10
Smarty-php1 product
- smarty< 4.5.8 | ≥ 5.0.0, < 5.8.5
4 vendors · 6 products
References
17 links- github.com/smarty-php/smarty/releases/tag/v5.8.5Release Notes
- github.com/smarty-php/smarty/releases/tag/v4.5.8Release Notes
- www.vulncheck.com/advisories/…Third Party Advisory