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

- Severity: High 7.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.51%, higher than 44% of CVEs (2026-12-01)
- Published: 2024-05-28T20:55:00.884Z
- Modified: 2026-06-17T07:34:34.840Z
- Also known as: GHSA-4rmg-292m-wg3w
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- smarty-php smarty: >= 5.0.0, < 5.1.1; >= 3.0.0, < 4.5.3; from 5.0.0 before 5.1.1; from 3.0.0 before 4.5.3
- smarty/smarty (Packagist): from 5.0.0 before 5.1.1; from 3.0.0 before 4.5.3

## Every score

- GitHub_M: CVSS:3.1 7.3 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N`
- GitHub: CVSS:3.1 7.3 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N`

## References

- <https://github.com/smarty-php/smarty/security/advisories/GHSA-4rmg-292m-wg3w> (web)
- <https://github.com/smarty-php/smarty/commit/0be92bc8a6fb83e6e0d883946f7e7c09ba4e857a> (web)
- <https://lists.debian.org/debian-lts-announce/2024/11/msg00013.html> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-35226> (advisory)
- <https://github.com/smarty-php/smarty> (package)

## Sources

- CVE List: [CVE-2024-35226](https://www.cve.org/CVERecord?id=CVE-2024-35226), CVE Terms of Use, modified 2025-11-03
- GitHub Advisory Database: [GHSA-4rmg-292m-wg3w](https://github.com/advisories/GHSA-4rmg-292m-wg3w), CC-BY-4.0, modified 2025-11-04
- NVD: [CVE-2024-35226](https://nvd.nist.gov/vuln/detail/CVE-2024-35226), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-35226 · Whole record: https://cve.day/CVE-2024-35226.json · Rebuilt by cve.day 2026-11-25T22:58:41.030Z
