CVE-2024-35226

PHP Code Injection by malicious attribute in extends-tag in Smarty

State
Published
Severity
7.3 High
Published
May 28, 2024
Updated
Nov 3, 2025
Reserved
May 14, 2024

Read the record on cve.org

Description

Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. In affected versions template authors could inject php code by choosing a malicious file name for an extends-tag. Sites that cannot fully trust template authors should update asap. All users are advised to update. There is no patch for users on the v3 branch. There are no known workarounds for this vulnerability.

Scores

CVSSScoreVectorSource
3.17.3 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:NGitHub_M

Weaknesses

  • CWE-94 Improper Control of Generation of Code ('Code Injection')

Affected Products

ProductVersions
smartysmarty-php
  • >= 5.0.0, < 5.1.1Affected
  • >= 3.0.0, < 4.5.3Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.