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.
References7
- github.com/smarty-php/smarty/commit/1cba51cb813563eb61d963c83d2…
- github.com/smarty-php/smarty/commit/c0fdd4824aca4f67e814b50703c…
- github.com/smarty-php/smarty/releases/tag/v4.5.8
- github.com/smarty-php/smarty/releases/tag/v5.8.5
- github.com/smarty-php/smarty/security/advisories/GHSA-3w63-v7pm…
- www.vulncheck.com/advisories/smarty-before-4.5.8-and-5-x-before…
- github.com/smarty-php/smarty/security/advisories/GHSA-3w63-v7pm…
Metrics
- CVSS 3.1
-
8.1
HIGH
Score source: NVD
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 4.0
-
9.2
CRITICAL
Score source: CNA
CVSS: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 - EPSS — exploit probability
- 1% percentile: 58 · as of 10 November 2026
- CWE
- CWE-94
Could this be exploited in your environment?
A patch closes the known hole. A penetration test shows what an attacker can still reach — with proof.