{"id":"CVE-2026-82531","aliases":["DEBIAN-CVE-2026-82531","EUVD-2026-93376","GHSA-3w63-v7pm-cq9x","MGASA-2026-0585","UBUNTU-CVE-2026-82531"],"status":"published","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.","severity":{"version":"4.0","score":9.2,"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","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00821,"percentile":0.57779,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-94"],"published":"2026-10-06T12:18:31Z","modified":"2026-11-09T16:45:57Z","exploits":[{"source":"pocgithub","id":"murrez/CVE-2026-82531","title":"murrez/CVE-2026-82531","date":"2026-10-07","url":"https://github.com/murrez/CVE-2026-82531"}],"fixes":[{"ecosystem":"Debian:14","package":"smarty4","fixed_in":["4.5.8-1"],"sources":["osv"]},{"ecosystem":"Mageia:10","package":"php-smarty","fixed_in":["5.8.5-1.mga10"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:12","package":"smarty3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.1.47-2","3.1.47-2+deb12u1","3.1.48-1","3.1.48-2"]},{"source":"osv","ecosystem":"Debian:13","package":"smarty3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.1.48-2"]},{"source":"osv","ecosystem":"Debian:14","package":"smarty3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.1.48-2"]},{"source":"osv","ecosystem":"Debian:12","package":"smarty4","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.3.0-1","4.3.0-1+deb12u1","4.3.0-1+deb12u2","4.3.1-1","4.5.4-1","4.5.5-1","4.5.8-1"]},{"source":"osv","ecosystem":"Debian:13","package":"smarty4","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.5.5-1","4.5.5-1+deb13u1","4.5.8-1"]},{"source":"osv","ecosystem":"Debian:14","package":"smarty4","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.5.8-1"}]}],"versions":["4.5.5-1"]},{"source":"osv","ecosystem":"Mageia:10","package":"php-smarty","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.8.5-1.mga10"}]}]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"smarty3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.1.21-1","3.1.21-1ubuntu1","3.1.21-1ubuntu1+esm1","3.1.21-1ubuntu1+esm2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"smarty3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.1.31+20161214.1.c7d42e4+selfpack1-2","3.1.31+20161214.1.c7d42e4+selfpack1-3","3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1","3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"smarty3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.1.33+20180830.1.3a78a21f+selfpack1-1","3.1.34+20190228.1.c9f0de05+selfpack1-1","3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1~esm1","3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1","3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1+esm1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"smarty3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.1.39-2","3.1.39-2ubuntu1","3.1.39-2ubuntu1.22.04.1","3.1.39-2ubuntu1.22.04.2"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"smarty3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.1.48-1","3.1.48-1ubuntu0.24.04.1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"smarty4","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.3.1-1","4.3.1-1ubuntu0.24.04.1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"smarty3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.1.48-2build1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"smarty4","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.5.5-1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"smarty3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.1.48-2","3.1.48-2build1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"smarty4","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.5.5-1"]}],"products":[{"vendor":"smarty-php","product":"smarty"}],"references":[{"url":"https://github.com/smarty-php/smarty/security/advisories/GHSA-3w63-v7pm-cq9x","tags":["vendor-advisory","exploit","advisory","report"]},{"url":"https://github.com/smarty-php/smarty/commit/c0fdd4824aca4f67e814b50703cfee1dfde41414","tags":["patch","fix"]},{"url":"https://github.com/smarty-php/smarty/commit/1cba51cb813563eb61d963c83d28cd59f26b858d","tags":["patch","fix"]},{"url":"https://github.com/smarty-php/smarty/releases/tag/v5.8.5","tags":["release-notes","advisory"]},{"url":"https://github.com/smarty-php/smarty/releases/tag/v4.5.8","tags":["release-notes","advisory"]},{"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","advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/82xxx/CVE-2026-82531.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-82531","tags":["advisory"]},{"url":"https://github.com/smarty-php/smarty","tags":["package"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-82531","tags":["advisory"]},{"url":"https://advisories.mageia.org/MGASA-2026-0585.html","tags":["advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=36622","tags":["report"]},{"url":"https://github.com/smarty-php/smarty/releases#release-v5.8.5","tags":["web"]},{"url":"https://github.com/smarty-php/smarty/releases#release-v5.8.4","tags":["web"]},{"url":"https://github.com/smarty-php/smarty/releases#release-v5.8.3","tags":["web"]},{"url":"https://github.com/smarty-php/smarty/releases#release-v5.8.2","tags":["web"]},{"url":"https://github.com/smarty-php/smarty/releases#release-v5.8.1","tags":["web"]},{"url":"https://github.com/smarty-php/smarty/releases#release-v5.8.0","tags":["web"]},{"url":"https://ubuntu.com/security/CVE-2026-82531","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-82531","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2026-82531","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.","status":"published","published":"2026-10-06T12:18:31.801Z","modified":"2026-10-06T12:47:10.95Z","cvss":[{"version":"4.0","score":9.2,"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","level":"critical","assessor":"cna"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T13:40:35.004553Z"}],"euvd":[{"id":"EUVD-2026-93376","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.","status":"published","published":"2026-10-06T12:18:31Z","modified":"2026-10-06T12:47:10Z","cvss":[{"version":"4.0","score":9.2,"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","level":"critical"}],"updated_at":"2026-11-02T17:27:37.923108Z"}],"nvd":[{"id":"CVE-2026-82531","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.","status":"published","published":"2026-10-06T13:16:50.18Z","modified":"2026-10-06T16:00:36.547Z","cvss":[{"version":"4.0","score":9.2,"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/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","level":"critical","assessor":"secondary"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:12:54.486849Z"}],"osv":[{"id":"CVE-2026-82531","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.","status":"published","published":"2026-10-06T12:18:31.801Z","modified":"2026-10-28T02:30:40.979188474Z","cvss":[{"version":"4.0","score":9.2,"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","level":"critical"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T15:45:18.131258Z"},{"id":"DEBIAN-CVE-2026-82531","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.","status":"published","published":"2026-10-06T13:16:50.18Z","modified":"2026-11-09T14:00:10.608207217Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-09T14:31:39.434822Z"},{"id":"UBUNTU-CVE-2026-82531","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.","status":"published","published":"2026-10-06T13:16:00Z","modified":"2026-10-17T13:01:12.158157098Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"},{"version":"4.0","score":9.2,"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","level":"critical"}],"updated_at":"2026-11-02T16:57:22.213888Z"},{"id":"MGASA-2026-0585","title":"Updated php-smarty package fixes a security vulnerability","description":"Smarty before 4.5.8 and 5.x before 5.8.5 contains a code injection\nvulnerability where the top-level nocache_hash is never restored during\nextends:/multi-component template inheritance, leaving it null.\nAttackers can supply assigned data containing a forged SmartyNocache\nmarker that is copied verbatim into the regenerated PHP cache file,\nexecuting arbitrary PHP on include for remote code execution.\n","status":"published","published":"2026-11-09T16:32:57Z","modified":"2026-11-09T16:45:57.396926968Z","updated_at":"2026-11-09T17:04:22.742827Z"}]}}
