CVE-2024-35226
HIGH 7.3CVSS 3.1Smarty vulnerable to PHP Code Injection by malicious attribute in extends-tag
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.
- Published
- 28 May 2024
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Deferred
- Weakness
- CWE-94
- Also known as
- GHSA-4rmg-292m-wg3w
- Sources
- NVDJSONOSV GHSA-4rmg-292m-wg3wJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.3 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.3 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | Packagist | smarty/smarty | >= 5.0.0, < 5.1.1 | 5.1.1 |
| OSV | Packagist | smarty/smarty | >= 3.0.0, < 4.5.3 | 4.5.3 |
References
- https://github.com/smarty-php/smarty/commit/0be92bc8a6fb83e6e0d883946f7e7c09ba4e857a · WEB
- https://github.com/smarty-php/smarty/security/advisories/GHSA-4rmg-292m-wg3w · 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
History
- 25 Nov 2026 20:55 UTC · NVD: first stored (published 28 May 2024)
- 25 Nov 2026 20:15 UTC · OSV: first stored (published 29 May 2024)