CVE-2024-35226
published high CVSS 3.1 · 7.3PHP Code Injection by malicious attribute in extends-tag in Smarty
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| smarty-php | — | smarty>= 5.0.0, < 5.1.1 · >= 3.0.0, < 4.5.3 | Affected | Not stated | GitHub_M |
| smarty-php | — | smarty5.0.0 to < 5.1.1 · 3.0.0 to < 4.5.3 · Other versions: unknown | Affected | Not stated | CISA-ADP |
| Debian | bookworm | smarty3 | Advisory build | 3.1.47-2+deb12u1 | DSA-5826-1 |
| Ubuntu | bionic | smarty3 | Advisory build | 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1 | USN-7158-1 |
| Debian | bookworm | smarty4 | Advisory build | 4.3.0-1+deb12u2 | DSA-5830-1 |
| Debian | bullseye | smarty3 | Advisory build | 3.1.39-2+deb11u2 | DLA-3956-1 |
| Ubuntu | focal | smarty3 | Advisory build | 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1 | USN-7158-1 |
| Ubuntu | jammy | smarty3 | Advisory build | 3.1.39-2ubuntu1.22.04.2 | USN-7158-1 |
Show 2 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Ubuntu | noble | smarty3 | Advisory build | 3.1.48-1ubuntu0.24.04.1 | USN-7158-1 |
| Ubuntu | noble | smarty4 | Advisory build | 4.3.1-1ubuntu0.24.04.1 | USN-7377-1 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.3 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| smarty-php | smarty | >= 5.0.0, < 5.1.1 (affected)>= 3.0.0, < 4.5.3 (affected) | GitHub_M · cna |
| smarty-php | smarty | 5.0.0 to < 5.1.1 (affected · custom)3.0.0 to < 4.5.3 (affected · custom)Default: unknown | CISA-ADP · adp |
Weaknesses
1- CWE-94 CWE-94: Improper Control of Generation of Code ('Code Injection')
References
3Provider assertions
3GitHub_M · cna
PHP Code Injection by malicious attribute in extends-tag in Smarty
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 11e5dd34b65761a66eebd69cc101b1b290f59bee788a99b1a5ee56216fb33e58
- Ingested
- 23 Sep 2026, 08:23:37 UTC
- Source record
- Official CVE record