CVE-2024-35226: PHP Code Injection by malicious attribute in extends-tag in Smarty
Vulnerability summary
CVE-2024-35226 is a high (CVSS 7.3) Improper Control of Generation of Code vulnerability in smarty-php smarty. EPSS estimates a 0.51% chance of exploitation in the next 30 days, higher than 44.8% of scored vulnerabilities.
Not severe (CVSS 7.3, network access); no exploitation reported by the 5 checked sources
CIRCL last checked 05-12-2026
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 3 · Related 1Timeline
- 28-05-2024PublishedVulnerability first disclosed.
- 03-11-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
4 scores · 4 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated7.3HighCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N
- OSV · DebianEcosystem advisory · calculated7.3HighCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N
- NVDNIST7.3HighCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N
EPSS trend
Probability
0.51%
Chance of exploitation in the next 30 days
Percentile
45%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.51% on 05-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, low-privilege account, user interaction (CVSS vector). Other conditions: not stated in public data.
Debian2 products
- smarty3< 3.1.47-2+deb12u1 | < 3.1.48-2
- smarty4< 4.5.4-1 | < 4.3.0-1+deb12u2
Ubuntu2 products
- smarty3All versions (No fix recorded) | < 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1 | < 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1 | < 3.1.39-2ubuntu1.22.04.2 | < 3.1.48-1ubuntu0.24.04.1
- smarty4< 4.3.1-1ubuntu0.24.04.1
Smarty-php1 product
- smarty≥ 5.0.0, < 5.1.1 | ≥ 3.0.0, < 4.5.3
3 vendors · 5 products