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.

Severity (CVSS 3.1)8.1High
Exploit odds (30 days)0.8%top 42.5% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack tooling1Public PoC

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

EcosystemPackageFixed inAdvisory
Debian:12smarty3no fix listedDEBIAN-CVE-2026-82531
Debian:13smarty3no fix listedDEBIAN-CVE-2026-82531
Debian:14smarty3no fix listedDEBIAN-CVE-2026-82531
Debian:12smarty4no fix listedDEBIAN-CVE-2026-82531
Debian:13smarty4no fix listedDEBIAN-CVE-2026-82531
Debian:14smarty4no fix listedDEBIAN-CVE-2026-82531
Ubuntu:22.04:LTSsmarty3no fix listedUBUNTU-CVE-2026-82531
Ubuntu:24.04:LTSsmarty3no fix listedUBUNTU-CVE-2026-82531
Ubuntu:26.04:LTSsmarty3no fix listedUBUNTU-CVE-2026-82531
Ubuntu:26.10smarty3no fix listedUBUNTU-CVE-2026-82531
Ubuntu:24.04:LTSsmarty4no fix listedUBUNTU-CVE-2026-82531
Ubuntu:26.04:LTSsmarty4no fix listedUBUNTU-CVE-2026-82531
Ubuntu:26.10smarty4no fix listedUBUNTU-CVE-2026-82531

Affected products (as reported)

VendorProductVersions
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