NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · Composer (PHP)

CVE-2024-35226: Smarty vulnerable to PHP Code Injection by malicious attribute in extends-tag

highCVSS 3.1 7.3GHSA-4rmg-292m-wg3w

Impact Template authors could inject php code by choosing a malicous file name for an extends-tag. Users that cannot fully trust template authors should update asap. Patches Please upgrade to the most recent version of Smarty v4 or v5. There is no patch for v3.

Published May 29, 2024 · Updated Nov 4, 2025

Affected packages

smarty/smarty

Ecosystem
Composer (PHP)
Affected
>= 5.0.0, < 5.1.1
Fixed in
5.1.1
Check
composer show smarty/smarty

smarty/smarty

Ecosystem
Composer (PHP)
Affected
>= 3.0.0, < 4.5.3
Fixed in
4.5.3
Check
composer show smarty/smarty

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

Impact

Template authors could inject php code by choosing a malicous file name for an extends-tag. Users that cannot fully trust template authors should update asap.

Patches

Please upgrade to the most recent version of Smarty v4 or v5. There is no patch for v3.

Credited to TrixterTheTux.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More Composer (PHP) vulnerabilities

All Composer (PHP) entries