Live threats

All CVEs / smarty-php

CVE-2026-82531smarty-php smarty

PHP Code Injection in Smarty via extends Template Inheritance

Critical 9.2 No auth needed

Priority
70
CVSS 4.0
9.2
EPSS
—
Auth required
No
Published
Oct 6, 2026
Updated
Oct 6, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-94
SSVC (CISA)
Exploitation: proof of concept · Automatable: no · Technical impact: total
Vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

What happens

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.

Show the original NVD text

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.

Source text, unmodified. NVD.

What to do

Patch available · fixed versions: 4.5.8, 5.8.5

Update Smarty to version 4.5.8 or later (4.x branch) or version 5.8.5 or later (5.x branch).

Vendor advisory · github.com ↗

  1. Apply the vendor's security update for smarty.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected products

As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.

Official sources

References

Links published by the sources. Open them with care.