CVE-2026-82531

published 6 Oct 2026 · updated 6 Oct 2026

Smarty before 4.5.8 and 5.x before 5.8.5 PHP Code Injection via extends: Inheritance Cache

8.1HighCVSS 8.1EPSS 1%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 1%. Fixed in 4.5.8 and 5.8.5.

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

Vendors, products and packages with version ranges

VendorProductVersionsFixed
smarty-php<4.5.8, >=5.0.0 <5.8.54.5.8, 5.8.5

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2026-82531 severity on Zeptric[![CVE-2026-82531](https://zeptric.io/badge/cve/CVE-2026-82531.svg)](https://zeptric.io/cve/CVE-2026-82531)