Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. smarty/smarty
  4. ›
  5. CVE-2024-35226

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

May 29, 2024 (updated November 4, 2025)

Template authors could inject php code by choosing a malicous file name for an extends-tag. Users that cannot fully trust template authors should update asap.

References

  • github.com/advisories/GHSA-4rmg-292m-wg3w
  • github.com/smarty-php/smarty
  • github.com/smarty-php/smarty/commit/0be92bc8a6fb83e6e0d883946f7e7c09ba4e857a
  • github.com/smarty-php/smarty/security/advisories/GHSA-4rmg-292m-wg3w
  • lists.debian.org/debian-lts-announce/2024/11/msg00013.html
  • nvd.nist.gov/vuln/detail/CVE-2024-35226

Code Behaviors & Features

Detect and mitigate CVE-2024-35226 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 3.0.0 before 4.5.3, all versions starting from 5.0.0 before 5.1.1

Fixed versions

  • 5.1.1
  • 4.5.3

Solution

Upgrade to versions 4.5.3, 5.1.1 or above.

Impact 7.3 HIGH

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

Learn more about CVSS

Weakness

  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

packagist/smarty/smarty/CVE-2024-35226.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Mon, 16 Nov 2026 12:16:58 +0000.