All vulnerabilities
CVE-2026-82531GHSA-3w63-v7pm-cq9x

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

smarty-php smartyRuntimes & languages
CVSS
9.2Critical
ExploitationPublic exploit codeCISA's assessment says proof of concept code is public, assessed 6 Oct 2026. Not in the KEV catalogCISA via CVE List
Exploit odds (EPSS)0.82%Chance of exploitation activity in the next 30 days, higher than 56% of CVEs. Scored 23 Oct 2026FIRST EPSS
Fixed in4.5.8Also 5.8.5CVE List
Published6 Oct 2026Updated 6 Oct 2026CVE List

What fixes it

A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.

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.

Text from CVE List

Affected versions 4

  • smartyaffected: all versions before 4.5.8CVE List
  • smartyaffected: 5.0.0 before 5.8.5CVE List
  • smartyunaffected: 4.5.8CVE List
  • smartyunaffected: 5.8.5CVE List

References 6