Skip to main content
VulnerabilityPublished Updated

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

Affects smarty/smartySource GCVE Database

0
Compare
Authoritative record:CVE-2024-35226· High 7.3

Not known to be exploited · CVSS 7.3 High : upgrade to 5.1.1 soon.

Data as of 31 Oct 2026, 01:25 UTC

CVSS 3.1 base score
7.3High
How severe the flaw is on the 0–10 CVSS scale.

Thin evidence

One scorer or none
CVSS scores by source
CNA (GitHub_M)CVSS 3.17.3
Patch
Available – fixed in 5.1.1, 4.5.3
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 28 May 2024

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.

What to do

Upgrade smarty/smarty to 5.1.1; smarty/smarty to 4.5.3.

Affected software

ProductAffectedFixed in
Packagistsmarty/smartyAffected
  • >=5.0.0 <5.1.1
Fixed in
  • 5.1.1
Packagistsmarty/smartyAffected
  • >=3.0.0 <4.5.3
Fixed in
  • 4.5.3

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Upgrade Smarty to version 4.5.3 or later, or 5.1.1 or later. There are no patches for Smarty version 3. Users should update as soon as possible if they cannot fully trust template authors. No other mitigations are specified.

Description

Smarty versions 3.0.0 through before 4.5.3 and 5.0.0 through before 5.1.1 are vulnerable to PHP code injection via a malicious file name in the extends-tag. This allows template authors to inject PHP code, posing a high risk especially when template authors are not fully trusted. The vulnerability is fixed in Smarty versions 4.5.3 and 5.1.1.

References

Community reviews

Loading reviews…