Vulnerability · Published May 28, 2024 · Assigned by GitHub_M
CVE-2024-35226PHP Code Injection by malicious attribute in extends-tag in Smarty
High 7.3
In plain English
A high-severity code injection in smarty from smarty-php. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 43% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | smarty3 | 3.1.47-2+deb12u1 | DSA-5826-1 |
| Debian:12 | smarty3 | 3.1.47-2+deb12u1 | DEBIAN-CVE-2024-35226 |
| Debian:13 | smarty3 | 3.1.48-2 | DEBIAN-CVE-2024-35226 |
| Debian:14 | smarty3 | 3.1.48-2 | DEBIAN-CVE-2024-35226 |
| Debian:12 | smarty4 | 4.3.0-1+deb12u2 | DSA-5830-1 |
| Debian:12 | smarty4 | 4.3.0-1+deb12u2 | DEBIAN-CVE-2024-35226 |
| Debian:13 | smarty4 | 4.5.4-1 | DEBIAN-CVE-2024-35226 |
| Debian:14 | smarty4 | 4.5.4-1 | DEBIAN-CVE-2024-35226 |
| Packagist | smarty/smarty | 4.5.3 | GHSA-4rmg-292m-wg3w |
| Packagist | smarty/smarty | 5.1.1 | GHSA-4rmg-292m-wg3w |
| Ubuntu:22.04:LTS | smarty3 | 3.1.39-2ubuntu1.22.04.2 | USN-7158-1 |
| Ubuntu:22.04:LTS | smarty3 | 3.1.39-2ubuntu1.22.04.2 | UBUNTU-CVE-2024-35226 |
| Ubuntu:24.04:LTS | smarty3 | 3.1.48-1ubuntu0.24.04.1 | UBUNTU-CVE-2024-35226 |
| Ubuntu:24.04:LTS | smarty3 | 3.1.48-1ubuntu0.24.04.1 | USN-7158-1 |
| Ubuntu:25.10 | smarty3 | no fix listed | UBUNTU-CVE-2024-35226 |
| Ubuntu:26.04:LTS | smarty3 | no fix listed | UBUNTU-CVE-2024-35226 |
| Ubuntu:26.10 | smarty3 | no fix listed | UBUNTU-CVE-2024-35226 |
| Ubuntu:24.04:LTS | smarty4 | 4.3.1-1ubuntu0.24.04.1 | UBUNTU-CVE-2024-35226 |
| Ubuntu:24.04:LTS | smarty4 | 4.3.1-1ubuntu0.24.04.1 | USN-7377-1 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| smarty-php | smarty | >= 5.0.0, < 5.1.1>= 3.0.0, < 4.5.3 |
Weakness: CWE-94 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N