Vulnerability · Published Oct 6, 2026 · Assigned by VulnCheck
CVE-2026-82531Smarty before 4.5.8 and 5.x before 5.8.5 PHP Code Injection via extends: Inheritance Cache
High 8.1
In plain English
A high-severity code injection in smarty from smarty-php. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.8% (higher than 57% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | smarty3 | no fix listed | DEBIAN-CVE-2026-82531 |
| Debian:13 | smarty3 | no fix listed | DEBIAN-CVE-2026-82531 |
| Debian:14 | smarty3 | no fix listed | DEBIAN-CVE-2026-82531 |
| Debian:12 | smarty4 | no fix listed | DEBIAN-CVE-2026-82531 |
| Debian:13 | smarty4 | no fix listed | DEBIAN-CVE-2026-82531 |
| Debian:14 | smarty4 | no fix listed | DEBIAN-CVE-2026-82531 |
| Ubuntu:22.04:LTS | smarty3 | no fix listed | UBUNTU-CVE-2026-82531 |
| Ubuntu:24.04:LTS | smarty3 | no fix listed | UBUNTU-CVE-2026-82531 |
| Ubuntu:26.04:LTS | smarty3 | no fix listed | UBUNTU-CVE-2026-82531 |
| Ubuntu:26.10 | smarty3 | no fix listed | UBUNTU-CVE-2026-82531 |
| Ubuntu:24.04:LTS | smarty4 | no fix listed | UBUNTU-CVE-2026-82531 |
| Ubuntu:26.04:LTS | smarty4 | no fix listed | UBUNTU-CVE-2026-82531 |
| Ubuntu:26.10 | smarty4 | no fix listed | UBUNTU-CVE-2026-82531 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| smarty-php | smarty | 0 – before 4.5.85.0.0 – before 5.8.5 |
Weakness: CWE-94 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- GitHub Security Advisory (GHSA-3w63-v7pm-cq9x) vendor-advisory
- https://github.com/smarty-php/smarty/commit/c0fdd4824aca4f67e814b50703cfee1dfde41414 patch
- https://github.com/smarty-php/smarty/commit/1cba51cb813563eb61d963c83d28cd59f26b858d patch
- smarty v5.8.5 Release Notes release-notes
- smarty v4.5.8 Release Notes release-notes
- VulnCheck Advisory: Smarty before 4.5.8 and 5.x before 5.8.5 PHP Code Injection via extends: Inheritance Cache third-party-advisory