Code Injection Vulnerability in Smarty

Patch this weekFull system takeover over the network, no login needed.
9.2CRITICAL

CVE-2026-82531

Key Information:

Vendor

Smarty-PHP

Status
Smarty
CVE ID
CVE ID:
CVE-2026-82531
Vendor
CVE Published:
6 October 2026
Fixed in
Fixed in:
4.5.8, 5.8.5

Timeline

Exploit known 1 day after it was published

  • ๐ŸŸก

    Public PoC available

  • ๐Ÿ‘พ

    Exploit known to exist

  • Vulnerability published

  • Vulnerability Reserved

Badges

๐Ÿ‘พ Exploit Exists๐ŸŸก Public PoC

How risky is it?

  • Yes: Works over the network, no login needed
  • Yes: Public exploit code (1 proof-of-concept)
  • No: Not on CISA's exploited list
  • No: No ransomware use seen

Our verdict

Patch this week

Exploitation is likely. Prioritise the fix.

What to do

1Update to a fixed version
smarty 0 to below 4.5.8 is vulnerable
smarty 5.0.0 to below 5.8.5 is vulnerable

Install the smarty release that fixes your version line, or later:

4.5.85.8.5
Read the vendor advisory โ†—
2Can't patch yet? Reduce exposure

It can be reached over the network, so limit who can reach smarty. Block it from the internet, allow only trusted hosts or a VPN, and turn off the affected feature if you don't use it, until you can update.

3Look for signs of compromise

Exploit code is public, so check logs on exposed smarty systems for unusual requests or new processes from before you patched. The 1 public proof-of-concept show what an attack looks like.

4Why it's rated "Patch this week"
  • Exploit code is public, so attacks are easy to copy.
  • It can be exploited remotely without credentials.
  • Its CVSS severity is critical (9.2).

What is CVE-2026-82531?

Smarty prior to version 4.5.8 and 5.x before 5.8.5 has a code injection vulnerability that arises due to improper handling of the nocache_hash during template inheritance. This oversight allows attackers to introduce malicious code through crafted assigned data containing a forged SmartyNocache marker. When the PHP cache file is regenerated, this marker is executed without validation, leading to potential remote code execution risks. Users of affected Smarty versions are encouraged to update to the latest releases to mitigate this vulnerability.

Affected Version(s)

smarty 0 < 4.5.8

smarty 5.0.0 < 5.8.5

smarty 4.5.8

Exploit Proof of Concept (PoC)

PoC code is written by security researchers to demonstrate the vulnerability can be exploited. PoC code is also a key component for weaponization which could lead to ransomware.

References

Facts on this page come from the sources listed above; the writeup is AI-assisted. How we rate vulnerabilities ยท Report a correction

CVSS V4

Score:
9.2
Severity:
CRITICAL
Confidentiality:
High
Integrity:
High
Availability:
High
Attack Vector:
Network
Attack Complexity:
Low
Attack Required:
Physical
Privileges Required:
Undefined
User Interaction:
None

Credit

MegaManSec
.