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.

Severity (CVSS 3.1)7.3High
Exploit odds (30 days)0.5%top 56.5% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Debian:12smarty33.1.47-2+deb12u1DSA-5826-1
Debian:12smarty33.1.47-2+deb12u1DEBIAN-CVE-2024-35226
Debian:13smarty33.1.48-2DEBIAN-CVE-2024-35226
Debian:14smarty33.1.48-2DEBIAN-CVE-2024-35226
Debian:12smarty44.3.0-1+deb12u2DSA-5830-1
Debian:12smarty44.3.0-1+deb12u2DEBIAN-CVE-2024-35226
Debian:13smarty44.5.4-1DEBIAN-CVE-2024-35226
Debian:14smarty44.5.4-1DEBIAN-CVE-2024-35226
Packagistsmarty/smarty4.5.3GHSA-4rmg-292m-wg3w
Packagistsmarty/smarty5.1.1GHSA-4rmg-292m-wg3w
Ubuntu:22.04:LTSsmarty33.1.39-2ubuntu1.22.04.2USN-7158-1
Ubuntu:22.04:LTSsmarty33.1.39-2ubuntu1.22.04.2UBUNTU-CVE-2024-35226
Ubuntu:24.04:LTSsmarty33.1.48-1ubuntu0.24.04.1UBUNTU-CVE-2024-35226
Ubuntu:24.04:LTSsmarty33.1.48-1ubuntu0.24.04.1USN-7158-1
Ubuntu:25.10smarty3no fix listedUBUNTU-CVE-2024-35226
Ubuntu:26.04:LTSsmarty3no fix listedUBUNTU-CVE-2024-35226
Ubuntu:26.10smarty3no fix listedUBUNTU-CVE-2024-35226
Ubuntu:24.04:LTSsmarty44.3.1-1ubuntu0.24.04.1UBUNTU-CVE-2024-35226
Ubuntu:24.04:LTSsmarty44.3.1-1ubuntu0.24.04.1USN-7377-1

Affected products (as reported)

VendorProductVersions
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

References