CVE-2026-82531
Received Received - Intake

Smarty Template Engine Code Injection via Nocache Hash

Vulnerability report for CVE-2026-82531, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-06

Last updated on: 2026-10-06

Assigner: 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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-06
Last Modified
2026-10-06
Generated
2026-10-06
AI Q&A
2026-10-06
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
smarty-php smarty 0
smarty-php smarty 5.0.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability affects the Smarty template engine versions before 4.5.8 and 5.x before 5.8.5. It allows code injection due to improper restoration of the nocache_hash during template inheritance. Attackers can exploit this by providing crafted data with a forged SmartyNocache marker, which gets copied into a PHP cache file and executes arbitrary PHP code when the cache is included.

Impact Analysis

If you use an affected version of Smarty, attackers could remotely execute arbitrary PHP code on your server. This could lead to full system compromise, data theft, or unauthorized access to sensitive information. The impact depends on the privileges of the web server user and the configuration of your system.

Compliance Impact

This vulnerability could lead to unauthorized access or data breaches, violating GDPR's data protection requirements and HIPAA's security rules for protected health information. Organizations may face fines, legal penalties, and reputational damage if exploited.

Mitigation Strategies

Upgrade Smarty to version 4.5.8 or later for the 4.x branch, or 5.8.5 or later for the 5.x branch to address the code injection flaw.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-82531. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart