CVE-2024-35226: smarty · Code Injection
Affects smartySource CVE Database V5
Not known to be exploited · CVSS 7.3 High.
Data as of 25 Oct 2026, 19:02 UTC
- EPSS
- 0.5% chance of exploitation in 30 days – higher than 43% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:NExploitation evidence
Disclosed: evidence found.
CVE published 28 May 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by 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 2026-10-25.
What to do
AI-suggested
1. Upgrade Smarty to the latest patched versions: For v4 and v5 branches, update to versions >=4.5.3 and >=5.1.1 respectively as soon as they become available. 2. For users on the unsupported v3 branch, consider migrating to a supported version promptly since no patches exist. 3. Restrict template author privileges strictly to trusted personnel only; avoid allowing untrusted or external contributors to upload or modify templates. 4. Implement rigorous input validation and sanitization on template filenames and any user-supplied data used in templates to prevent injection of malicious code. 5. Employ runtime application self-protection (RASP) or web application firewalls (WAFs) with custom rules to detect and block suspicious template-related requests. 6. Conduct code reviews and security audits of templates before deployment to identify potential injection vectors. 7. Monitor logs for unusual template loading or execution patterns that could indicate exploitation attempts. 8. Isolate web application environments to limit the impact of potential code execution. 9. Educate developers and template authors about secure template practices and the risks of code injection.
Description
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.