Skip to content
OpenAdvisories
High · 8.1 Public exploit CVE-2026-82531 EUVD-2026-93376

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

Published Oct 6, 2026 · Updated Oct 6, 2026 · 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.

Affected products

VendorProductAffectedFixed
smarty-php smarty < 4.5.8, 5.0.0 – < 5.8.5 4.5.8

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 smarty3 No fix yet —
Debian 14 smarty4 4.5.8-1 —
Debian 13 smarty3 +1 No fix yet —
Debian 12 smarty3 +1 No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 smarty3 +1 No fix yet —
Ubuntu 26.04 LTS smarty3 +1 No fix yet —
Ubuntu 24.04 LTS smarty3 +1 No fix yet —
Ubuntu 22.04 LTS smarty3 No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 20.04 LTS smarty3 No fix yet —
Ubuntu Pro 18.04 LTS smarty3 No fix yet —
Ubuntu Pro 16.04 LTS smarty3 No fix yet —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

  • murrez/CVE-2026-82531 ★ 2 · Oct 7, 2026

    Smarty is vulnerable to code injection through template inheritance. Crafted assigned data can inject a forged SmartyNocache marker into regenerated PHP cache files, potentially allowing attackers to…

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

References