Smarty before 4.5.8 and 5.x before 5.8.5 PHP Code Injection via extends: Inheritance Cache
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.
CVE-2026-82531
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: cve:CVE-2026-82531
smarty
Source reference: /containers/cna/affected/0/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"repo": "https://github.com/smarty-php/smarty",
"vendor": "smarty-php",
"product": "smarty",
"versions": [
{
"status": "affected",
"version": "0",
"lessThan": "4.5.8",
"versionType": "semver"
},
{
"status": "affected",
"version": "5.0.0",
"lessThan": "5.8.5",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "4.5.8",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "5.8.5",
"versionType": "semver"
}
],
"packageURL": "pkg:composer/smarty/smarty",
"defaultStatus": "unaffected"
}
]- Related CVEs
- CVE-2026-82531
Source reference:
/cveMetadata/cveId
Publisher severity
critical
Source reference: /containers/cna/metrics
- Event
- #9223 · Revision 1
- Added to Heist Feed
- Publisher date