{"id":"CVE-2026-82531","aliases":["CVE-2026-82531"],"related":[],"kind":"vulnerability","state":"published","title":"Smarty before 4.5.8 and 5.x before 5.8.5 PHP Code Injection via extends: Inheritance Cache","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"}],"published":"2026-10-06T12:18:31.801Z","modified":"2026-10-06T16:00:36.547Z","severity":{"scorer":"VulnCheck","scheme":"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,"rating":"CRITICAL"},"severities":[{"scorer":"VulnCheck","scheme":"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,"rating":"CRITICAL"},{"scorer":"VulnCheck","scheme":"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,"rating":"HIGH"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"4.5.8","status":"affected"},{"type":"semver","introduced":"5.0.0","fixed":"5.8.5","status":"affected"},{"type":"semver","version":"4.5.8","status":"unaffected"},{"type":"semver","version":"5.8.5","status":"unaffected"}],"vendor":"smarty-php","product":"smarty","repo":"https://github.com/smarty-php/smarty","source":"cvelist"}],"references":[{"url":"https://github.com/smarty-php/smarty/security/advisories/GHSA-3w63-v7pm-cq9x","tags":["exploit","vendor-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/smarty-php/smarty/commit/c0fdd4824aca4f67e814b50703cfee1dfde41414","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://github.com/smarty-php/smarty/commit/1cba51cb813563eb61d963c83d28cd59f26b858d","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://github.com/smarty-php/smarty/releases/tag/v5.8.5","tags":["release-notes"],"sources":["cvelist","nvd"]},{"url":"https://github.com/smarty-php/smarty/releases/tag/v4.5.8","tags":["release-notes"],"sources":["cvelist","nvd"]},{"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":["third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":["MegaManSec"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-10-06T12:44:36.819Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-82531","url":"https://www.cve.org/CVERecord?id=CVE-2026-82531","licence":"CVE Terms of Use","modified":"2026-10-06T12:47:10.950Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-82531","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-82531","licence":"Public domain","modified":"2026-10-06T16:00:36.547Z"}],"updatedAt":"2026-11-25T22:59:42.350Z","epss":{"score":0.00821,"percentile":0.58425,"date":"2026-12-01T12:00:22.000Z"}}