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

- Priority: **Prioritise**
- Reason: Severe, CVSS 9.2 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 1% (FIRST, 05-12-2026)
- Next step: Check applicability: affected before 4.5.8, 5.8.5 (CNA); fix release not confirmed
- Status: published
- Published: 2026-10-06 · Modified: 2026-10-06
- Aliases: UBUNTU-CVE-2026-82531, DEBIAN-CVE-2026-82531, MGASA-2026-0585
- Record: https://cvemate.com/vulnerability/CVE-2026-82531 · JSON: https://cvemate.com/vulnerability/CVE-2026-82531/json

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

## Signals

- CVSS: 9.2 critical (v4.0, CVE.org) 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
- EPSS: 0.821%, percentile 58.633%, as of 2026-12-05
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- debian smarty3 (Debian): All versions (No fix recorded)
- debian smarty4 (Debian): All versions (No fix recorded) \| \< 4.5.5-1+deb13u1 \| \< 4.5.8-1
- ubuntu smarty3 (Ubuntu): All versions (No fix recorded)
- ubuntu smarty4 (Ubuntu): All versions (No fix recorded)
- mageia php-smarty (Mageia): \< 5.8.5-1.mga10
- smarty-php smarty: \< 4.5.8 \| ≥ 5.0.0, \< 5.8.5

## 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>
- <https://ubuntu.com/security/CVE-2026-82531>
- <https://www.cve.org/CVERecord?id=CVE-2026-82531>
- <https://security-tracker.debian.org/tracker/CVE-2026-82531>
- <https://advisories.mageia.org/MGASA-2026-0585.html>
- <https://bugs.mageia.org/show_bug.cgi?id=36622>
- <https://github.com/smarty-php/smarty/releases#release-v5.8.5>
- <https://github.com/smarty-php/smarty/releases#release-v5.8.4>
- <https://github.com/smarty-php/smarty/releases#release-v5.8.3>
- <https://github.com/smarty-php/smarty/releases#release-v5.8.2>
- <https://github.com/smarty-php/smarty/releases#release-v5.8.1>
- <https://github.com/smarty-php/smarty/releases#release-v5.8.0>

---

Data as of 2026-12-05T14:42:48.040Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
