CVE-2024-35226: smarty/smarty · Smarty vulnerable to PHP Code Injection by malicious attribute in extends-tag
Affects smarty/smartySource GCVE Database
Not known to be exploited · CVSS 7.3 High : upgrade to 5.1.1 soon.
Data as of 31 Oct 2026, 01:25 UTC
Thin evidence
One scorer or none| CNA (GitHub_M) | CVSS 3.1 | 7.3 |
|---|
- Patch
- Available – fixed in 5.1.1, 4.5.3
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:NExploitation evidence
Disclosed: evidence found.
CVE published 28 May 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.
What to do
Upgrade smarty/smarty to 5.1.1; smarty/smarty to 4.5.3.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| Packagistsmarty/smarty | Affected
| Fixed in
|
| Packagistsmarty/smarty | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade Smarty to version 4.5.3 or later, or 5.1.1 or later. There are no patches for Smarty version 3. Users should update as soon as possible if they cannot fully trust template authors. No other mitigations are specified.
Description
Smarty versions 3.0.0 through before 4.5.3 and 5.0.0 through before 5.1.1 are vulnerable to PHP code injection via a malicious file name in the extends-tag. This allows template authors to inject PHP code, posing a high risk especially when template authors are not fully trusted. The vulnerability is fixed in Smarty versions 4.5.3 and 5.1.1.
References
- github.com/smarty-php/smarty/security/advisories/GHSA-4rmg-292m-wg3w (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2024-35226 (opens in a new tab)
- github.com/smarty-php/smarty/commit/0be92bc8a6fb83e6e0d883946f7e7c09ba4e857a (opens in a new tab)
- github.com/smarty-php/smarty (opens in a new tab)
- lists.debian.org/debian-lts-announce/2024/11/msg00013.html (opens in a new tab)