Improper Control of Generation of Code ('Code Injection') Affecting smarty/smarty package, versions >=3.0.0, <4.5.3>=5.0.0, <5.1.1


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.04% (11th 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 Improper Control of Generation of Code ('Code Injection') vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PHP-SMARTYSMARTY-7198481
  • published4 Jun 2024
  • disclosed29 May 2024
  • creditStepan Fedotov

Introduced: 29 May 2024

CVE-2024-35226  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade smarty/smarty to version 4.5.3, 5.1.1 or higher.

Overview

Affected versions of this package are vulnerable to Improper Control of Generation of Code ('Code Injection') via the extends-tag attribute. An attacker can execute arbitrary PHP code by specifying a malicious file name in the extends-tag attribute.

References

CVSS Scores

version 3.1