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

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
  • 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. Learn more about Dependency Scanning →

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 Wed, 14 May 2025 12:15:33 +0000.