{"id":"CVE-2024-35226","published":"2024-05-28T20:55:00Z","modified":"2025-11-03T21:54:58Z","title":"PHP Code Injection by malicious attribute in extends-tag in Smarty","vendor":"smarty-php","product":"smarty","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.3,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00881,"percentile":0.56902,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/smarty-php/smarty/security/advisories/GHSA-4rmg-292m-wg3w","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/smarty-php/smarty/commit/0be92bc8a6fb83e6e0d883946f7e7c09ba4e857a","tags":["x_refsource_MISC"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/11/msg00013.html","tags":[]}],"priority":{"score":16.5,"factors":[{"name":"EPSS percentile","points":11.38},{"name":"CVSS severity","points":5.11}]},"vendorSlug":"smarty-php","affectedVersions":[{"vendor":"smarty-php","product":"smarty","versions":[">= 5.0.0, < 5.1.1",">= 3.0.0, < 4.5.3"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2024-09-03T18:08:18.966927Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Packagist","package":"smarty/smarty","vulnerableRanges":[">=5.0.0, <5.1.1",">=3.0.0, <4.5.3"],"patched":["5.1.1","4.5.3"],"from":["GHSA-4rmg-292m-wg3w"],"provenance":"source"}],"summary":{"text":"The Smarty template engine for PHP contains a code injection flaw in how the extends tag handles file names, letting template authors embed PHP code through a crafted file name.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:38:17Z"},"euvd":{"id":"EUVD-2024-1424","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2022-29221","published":"2022-05-24","fixed":"4.1.1","kev":false},{"cve":"CVE-2018-25047","published":"2022-09-14","fixed":"4.2.1","kev":false},{"cve":"CVE-2023-28447","published":"2023-03-28","fixed":"4.3.1","kev":false,"link":{"from":"CVE-2023-28447","to":"CVE-2024-35226","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Packagist:smarty/smarty","fromFixed":"4.3.1","toFixed":"4.5.3","daysApart":427}]}},{"cve":"CVE-2024-35226","published":"2024-05-28","fixed":"5.1.1","kev":false},{"cve":"CVE-2026-62992","published":"2026-08-07","fixed":"5.8.2","kev":false},{"cve":"CVE-2026-62993","published":"2026-08-31","fixed":"5.8.2","kev":false},{"cve":"CVE-2026-62996","published":"2026-08-07","fixed":"5.8.4","kev":false}],"package":"Packagist:smarty/smarty"}}