{"id":"CVE-2026-82531","published":"2026-10-06T12:18:31Z","modified":"2026-10-06T12:47:10Z","title":"Smarty before 4.5.8 and 5.x before 5.8.5 PHP Code Injection via extends: Inheritance Cache","vendor":"smarty-php","product":"smarty","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.1,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01172,"percentile":0.67274,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/smarty-php/smarty/security/advisories/GHSA-3w63-v7pm-cq9x","tags":["vendor-advisory"]},{"url":"https://github.com/smarty-php/smarty/commit/c0fdd4824aca4f67e814b50703cfee1dfde41414","tags":["patch"]},{"url":"https://github.com/smarty-php/smarty/commit/1cba51cb813563eb61d963c83d28cd59f26b858d","tags":["patch"]},{"url":"https://github.com/smarty-php/smarty/releases/tag/v5.8.5","tags":["release-notes"]},{"url":"https://github.com/smarty-php/smarty/releases/tag/v4.5.8","tags":["release-notes"]},{"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"]}],"priority":{"score":24.1,"factors":[{"name":"EPSS percentile","points":13.45},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":5.67}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2026-10-07","earliestUrl":"https://github.com/murrez/CVE-2026-82531","repos":[{"name":"murrez/CVE-2026-82531","url":"https://github.com/murrez/CVE-2026-82531","stars":2,"created":"2026-10-07"}]},"first":{"date":"2026-10-07","source":"PoC-in-GitHub","url":"https://github.com/murrez/CVE-2026-82531"},"provenance":"source"},"vendorSlug":"smarty-php","affectedVersions":[{"vendor":"smarty-php","product":"smarty","versions":["< 4.5.8",">= 5.0.0, < 5.8.5"]}],"fixedVersions":[{"vendor":"smarty-php","product":"smarty","versions":["4.5.8","5.8.5"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-10-06T12:44:36.819504Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-93376","exploited":false,"provenance":"source"}}