Read the docs
TI-2024-23296 Aliases CVE-2024-35226GHSA-4rmg-292m-wg3w

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

Priority LOW 35CWE-94Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
Required
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-94.

Summary

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00507 43rd percentileScored 2026-11-07
Fix Fixed smarty (smarty-php): 5.1.1, 4.5.3smarty/smarty (Packagist): 5.1.1, 4.5.3

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
smarty-phpsmarty5.0.0 to before 5.1.1; 3.0.0 to before 4.5.35.1.1, 4.5.3Patch availableCNA
—smarty/smarty (Packagist)5.0.0 to before 5.1.15.1.1Patch availableGHSA-4rmg-292m-wg3w
—smarty/smarty (Packagist)3.0.0 to before 4.5.34.5.3Patch availableGHSA-4rmg-292m-wg3w
  • smarty Vendorsmarty-php Affected 5.0.0 to before 5.1.1; 3.0.0 to before 4.5.3 Fixed in 5.1.1, 4.5.3 Patch available CNA
  • smarty/smarty (Packagist) Vendor— Affected 5.0.0 to before 5.1.1 Fixed in 5.1.1 Patch available GHSA-4rmg-292m-wg3w
  • smarty/smarty (Packagist) Vendor— Affected 3.0.0 to before 4.5.3 Fixed in 4.5.3 Patch available GHSA-4rmg-292m-wg3w

CPE names CISA-ADP · 1

CPEVersionsRoleVendor
cpe:2.3:a:smarty-php:smarty:*:*:*:*:*:*:*:*———
  • cpe:2.3:a:smarty-php:smarty:*:*:*:*:*:*:*:* Versions — — ·—

Remediation

  • Fix · CNA smarty (smarty-php) Fixed in 5.1.1, 4.5.3
  • Fix · GHSA-4rmg-292m-wg3w smarty/smarty (Packagist) Fixed in 5.1.1 Advisory →
  • Fix · GHSA-4rmg-292m-wg3w smarty/smarty (Packagist) Fixed in 4.5.3 Advisory →

Vendor assessments

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-10-02 Threatist record created from CVE-2024-35226
  2. 2026-10-03 Alias added: GHSA-4rmg-292m-wg3w

References

  • TI-2021-08070 Smarty before 3.1.39 allows code injection via an unexpected function name after a {function name= substring. CVSS 3.1CRITICAL 9.8
  • TI-2026-68416 Code injection in Smarty via extends: inheritance cache CVSS 4.0CRITICAL 9.2
  • TI-2026-44997 Smarty Security stream restriction bypass through stream: resource CVSS 4.0MEDIUM 6.9
  • TI-2009-01585 The smarty_function_math function in libs/plugins/function.math.php in Smarty 2.6.22… CVSS 2.0HIGH 10.0
  • TI-2006-06846 PHP remote file inclusion vulnerability in libs/Smarty.class.php in Smarty 2.6.9 allows… CVSS 3.1CRITICAL 9.8
  • TI-2022-11764 PHP Code Injection by malicious block or filename in Smarty CVSS 3.1HIGH 8.8
See all 35 →

Sources