# CVE-2026-82531: Smarty before 4.5.8 and 5.x before 5.8.5 PHP Code Injection via extends: Inheritance Cache

- Severity: Critical 9.2 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.82%, higher than 58% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-10-06T12:18:31.801Z
- Modified: 2026-10-06T16:00:36.547Z
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: VulnCheck

## 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.

(As written by CVE List.)

## Affected

- smarty-php smarty: before 4.5.8; from 5.0.0 before 5.8.5 (not affected: 4.5.8; 5.8.5)

## Every score

- VulnCheck: CVSS:4.0 9.2 Critical `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`
- VulnCheck: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/smarty-php/smarty/security/advisories/GHSA-3w63-v7pm-cq9x> (exploit, vendor-advisory)
- <https://github.com/smarty-php/smarty/commit/c0fdd4824aca4f67e814b50703cfee1dfde41414> (patch)
- <https://github.com/smarty-php/smarty/commit/1cba51cb813563eb61d963c83d28cd59f26b858d> (patch)
- <https://github.com/smarty-php/smarty/releases/tag/v5.8.5> (release-notes)
- <https://github.com/smarty-php/smarty/releases/tag/v4.5.8> (release-notes)
- <https://www.vulncheck.com/advisories/smarty-before-4.5.8-and-5-x-before-5.8.5-php-code-injection-via-extends-inheritance-cache> (third-party-advisory)

## Sources

- CVE List: [CVE-2026-82531](https://www.cve.org/CVERecord?id=CVE-2026-82531), CVE Terms of Use, modified 2026-10-06
- NVD: [CVE-2026-82531](https://nvd.nist.gov/vuln/detail/CVE-2026-82531), Public domain, modified 2026-10-06

---

Page: https://cve.day/CVE-2026-82531 · Whole record: https://cve.day/CVE-2026-82531.json · Rebuilt by cve.day 2026-11-25T22:59:42.350Z
