VDB

CVE-2024-35226

CVE-2024-35226 PUBLISHED CVSS 7.3 HIGH

PHP Code Injection by malicious attribute in extends-tag in Smarty

Reported by github_m · Published May 28, 2024

smarty/smarty is fixed in 5.1.1 and 4.5.3 (Packagist)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
smarty/smartyPackagist5.1.1, 4.5.3
smartysmarty-php5.1.1, 4.5.3

Risk scores

CVSS 3.1
7.3
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N

Affected products

VendorProductVersions
smarty-phpsmarty>= 5.0.0, < 5.1.1, >= 3.0.0, < 4.5.3
smarty-phpsmarty5.0.0, 3.0.0
smarty-phpsmarty5.0.0, 3.0.0
smartysmarty5.0.0, 3.0.0

Timeline

  • May 28, 2024 CVE Published
  • May 29, 2024 EPSS Score (30 in total, the first dated here)
  • Oct 4, 2024 Coalition ESS Score (11 in total, the first dated here)
  • Jan 10, 2026 Security Advisory (2 in total, the first dated here)
  • Jun 17, 2026 CVE Updated
  • Aug 10, 2026 Distribution Patch

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2024-35226
vulnetix vdb fixes CVE-2024-35226

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-35226/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›