{"id":"CVE-2026-82531","revision":"78bea8567d1f427f8d680dda6c3138e8","records":[{"revision":"78bea8567d1f427f8d680dda6c3138e8","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-82531","aliases":[],"title":"Smarty before 4.5.8 and 5.x before 5.8.5 PHP Code Injection via extends: Inheritance Cache","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.","state":0,"publishedAt":"2026-10-06T12:18:31.801+00:00","modifiedAt":"2026-10-06T12:47:10.95+00:00","affected":[{"ecosystem":"Vendor product","name":"smarty","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"smarty-php\",\n                    \"product\": \"smarty\",\n                    \"defaultStatus\": \"unaffected\",\n                    \"versions\": [\n                        {\n                            \"version\": \"0\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\",\n                            \"lessThan\": \"4.5.8\"\n                        },\n                        {\n                            \"version\": \"5.0.0\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\",\n                            \"lessThan\": \"5.8.5\"\n                        },\n                        {\n                            \"version\": \"4.5.8\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"5.8.5\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        }\n                    ],\n                    \"packageURL\": \"pkg:composer/smarty/smarty\",\n                    \"repo\": \"https://github.com/smarty-php/smarty\"\n                }"}],"metrics":[{"system":"CVSS 4.0","vector":"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","score":9.2,"severity":"CRITICAL"},{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"severity":"HIGH"}],"references":["https://github.com/smarty-php/smarty/security/advisories/GHSA-3w63-v7pm-cq9x","https://github.com/smarty-php/smarty/commit/c0fdd4824aca4f67e814b50703cfee1dfde41414","https://github.com/smarty-php/smarty/commit/1cba51cb813563eb61d963c83d28cd59f26b858d","https://github.com/smarty-php/smarty/releases/tag/v5.8.5","https://github.com/smarty-php/smarty/releases/tag/v4.5.8","https://www.vulncheck.com/advisories/smarty-before-4.5.8-and-5-x-before-5.8.5-php-code-injection-via-extends-inheritance-cache"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-82531","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-82531","identifiers":["CVE-2026-82531"]},"retained":false,"historicalAffected":[]}],"coverage":[]}