Arbitrary Code Injection Affecting smarty/smarty package, versions <4.5.8>=5.0.0, <5.8.5


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.82% (56th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PHP-SMARTYSMARTY-21204261
  • published18 Oct 2026
  • disclosed6 Oct 2026
  • creditUnknown

Introduced: 6 Oct 2026

NewCVE-2026-82531  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade smarty/smarty to version 4.5.8, 5.8.5 or higher.

Overview

Affected versions of this package are vulnerable to Arbitrary Code Injection via the extends process in template inheritance when the top-level nocache_hash is not restored, allowing a forged SmartyNocache marker to be injected into the regenerated PHP cache file. An attacker can execute arbitrary PHP code by supplying crafted assigned data that is copied verbatim into the cache file.

CVSS Base Scores

version 4.0
version 3.1