cve.bz

CVE-2024-35226 smarty-php smarty: Code Injection

7.3 highEPSS 0.5%Fix available

High (7.3) in smarty-php smarty. EPSS 0.5% estimated probability of exploitation activity in the next 30 days. Fixed in smarty/smarty 4.5.3, 5.1.1.

On this page
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.

Severity

CVSS 3.1

7.3 high
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N
EPSS
0.5% (unchanged from 0.5% a week ago; 0.5% 30 days ago) estimated probability of exploitation activity in the next 30 days; 44th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2024-09-03. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-94 Improper Control of Generation of Code (Code Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-35226 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-35226?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-35226?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-35226 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
smarty-php smarty>= 5.0.0, < 5.1.1
smarty-php smarty>= 3.0.0, < 4.5.3

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-4rmg-292m-wg3wPackagistsmarty/smarty>=5.0.0 <5.1.15.1.1
GHSA-4rmg-292m-wg3wPackagistsmarty/smarty>=3.0.0 <4.5.34.5.3

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11smarty33.1.39-2+deb11u2DLA-3956-1
Debian12smarty33.1.47-2+deb12u1DEBIAN-CVE-2024-35226 DSA-5826-1
Debian12smarty44.3.0-1+deb12u2DEBIAN-CVE-2024-35226 DSA-5830-1
Debian13, 14smarty33.1.48-2DEBIAN-CVE-2024-35226
Debian13, 14smarty44.5.4-1DEBIAN-CVE-2024-35226
Ubuntu20.04:LTSsmarty33.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1UBUNTU-CVE-2024-35226 USN-7158-1
Ubuntu22.04:LTSsmarty33.1.39-2ubuntu1.22.04.2UBUNTU-CVE-2024-35226 USN-7158-1
Ubuntu24.04:LTSsmarty33.1.48-1ubuntu0.24.04.1UBUNTU-CVE-2024-35226 USN-7158-1
Ubuntu24.04:LTSsmarty44.3.1-1ubuntu0.24.04.1UBUNTU-CVE-2024-35226 USN-7377-1
Ubuntu25.10, 26.04:LTS, 26.10 and 1 moresmarty3no fix listedUBUNTU-CVE-2024-35226
UbuntuPro:18.04:LTSsmarty33.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1UBUNTU-CVE-2024-35226 USN-7158-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Attack patterns (CAPEC)

  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
  • CAPEC-242 Code Injection Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON