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

- Priority: **Routine**
- Reason: Not severe (CVSS 7.3, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-05-28 · Modified: 2025-11-03
- Aliases: UBUNTU-CVE-2024-35226, USN-7377-1, DEBIAN-CVE-2024-35226, DSA-5830-1
- Record: https://cvemate.com/vulnerability/CVE-2024-35226 · JSON: https://cvemate.com/vulnerability/CVE-2024-35226/json

## 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.
```

## Signals

- CVSS: 7.3 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N
- EPSS: 0.507%, percentile 44.887%, as of 2026-12-05
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- debian smarty3 (Debian): \< 3.1.47-2+deb12u1 \| \< 3.1.48-2
- debian smarty4 (Debian): \< 4.5.4-1 \| \< 4.3.0-1+deb12u2
- ubuntu smarty3 (Ubuntu): All 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
- ubuntu smarty4 (Ubuntu): \< 4.3.1-1ubuntu0.24.04.1
- smarty-php smarty: ≥ 5.0.0, \< 5.1.1 \| ≥ 3.0.0, \< 4.5.3

## References

- <https://github.com/smarty-php/smarty/security/advisories/GHSA-4rmg-292m-wg3w>
- <https://github.com/smarty-php/smarty/commit/0be92bc8a6fb83e6e0d883946f7e7c09ba4e857a>
- <https://lists.debian.org/debian-lts-announce/2024/11/msg00013.html>
- <https://ubuntu.com/security/CVE-2024-35226>
- <https://www.cve.org/CVERecord?id=CVE-2024-35226>
- <https://github.com/smarty-php/smarty/commit/76881c8d33d80648f70c9b0339f770f5f69a87a2>
- <https://ubuntu.com/security/notices/USN-7158-1>
- <https://ubuntu.com/security/notices/USN-7377-1>
- <https://security-tracker.debian.org/tracker/CVE-2024-35226>

---

Data as of 2026-12-05T14:43:01.059Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
