{"id":"CVE-2026-82531","published":"2026-10-06T13:16:50.180","lastModified":"2026-10-06T16:00:36.547","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.","cvssScore":8.1,"cvssSeverity":"HIGH","cvssVector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","cwes":["CWE-94"],"vendors":[],"products":[],"references":[{"url":"https://github.com/smarty-php/smarty/commit/1cba51cb813563eb61d963c83d28cd59f26b858d","tags":[]},{"url":"https://github.com/smarty-php/smarty/commit/c0fdd4824aca4f67e814b50703cfee1dfde41414","tags":[]},{"url":"https://github.com/smarty-php/smarty/releases/tag/v4.5.8","tags":[]},{"url":"https://github.com/smarty-php/smarty/releases/tag/v5.8.5","tags":[]},{"url":"https://github.com/smarty-php/smarty/security/advisories/GHSA-3w63-v7pm-cq9x","tags":[]},{"url":"https://www.vulncheck.com/advisories/smarty-before-4.5.8-and-5-x-before-5.8.5-php-code-injection-via-extends-inheritance-cache","tags":[]},{"url":"https://github.com/smarty-php/smarty/security/advisories/GHSA-3w63-v7pm-cq9x","tags":[]}],"exploitRefs":[{"url":"https://github.com/smarty-php/smarty/commit/1cba51cb813563eb61d963c83d28cd59f26b858d","tags":[]},{"url":"https://github.com/smarty-php/smarty/commit/c0fdd4824aca4f67e814b50703cfee1dfde41414","tags":[]},{"url":"https://github.com/smarty-php/smarty/releases/tag/v4.5.8","tags":[]},{"url":"https://github.com/smarty-php/smarty/releases/tag/v5.8.5","tags":[]},{"url":"https://github.com/smarty-php/smarty/security/advisories/GHSA-3w63-v7pm-cq9x","tags":[]},{"url":"https://github.com/smarty-php/smarty/security/advisories/GHSA-3w63-v7pm-cq9x","tags":[]}],"hasPoc":true,"ai":{"summary":"Smarty template engine contains a code injection vulnerability where forged nocache_hash markers can be copied verbatim into PHP cache files, enabling remote code execution through arbitrary PHP code execution on include. This affects versions before 4.5.8 and 5.x before 5.8.5.","exploitability":"Exploitation requires crafting a specific assigned data structure with a forged SmartyNocache marker that gets embedded into generated cache files, making it moderately difficult but possible for attackers with template rendering access.","blast_radius":"If exploited, this vulnerability could lead to full remote code execution on the web server, potentially allowing attackers to execute arbitrary commands, access sensitive data, or compromise the entire application environment.","remediation":"Upgrade to Smarty 4.5.8 or 5.8.5 to remediate this code injection vulnerability.","detection":"No reliable host or network indicator is derivable from the published description.","tags":["rce","template-injection","web","php"],"model":"garnet-coder","analyzedAt":"2026-10-14T08:58:55.028Z"}}