CVE-2022-29221
mediumpriority · attend · 47EPSS 0.049 · 92 %ileexploit · PoCEURUUSEPSS · scored 2026-10-27
Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Prior to versions 3.1.45 and 4.1.1, template authors could inject php code by choosing a malicious {block} name or {include} file name. Sites that cannot fully trust template authors should upgrade to versions 3.1.45 or 4.1.1 to receive a patch for this issue. There are currently no known workarounds.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–high · 6.5–8.8
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
exploits (1)
Public proof-of-concept and weaponised exploit code.
- sbani/CVE-2022-29221-PoCCVE-2022-29221 Proof of Concept Code - Smarty RCEPoC · poc_in_github
affected products (13)
Products and version ranges known to be affected.
advisories (1)
Vendor and ecosystem advisories describing this.
- GHSA-634x-pc3q-cf4cPHP Code Injection by malicious block or filename in Smarty2022-05-25ghsa · osvUS
### Impact Template authors could inject php code by choosing a malicous {block} name or {include} file name. Sites that cannot fully trust template authors should update asap. ### Patches Please upgrade to the most recent version of Smarty v3 or v4. ### Workarounds _Is there a way for users to fix or remediate the vulnerability without upgrading?_ ### References _Are there any links users can visit to find out more?_ ### For more information If you have any questions or comments about this advisory: * Open an issue in [the Smarty repo](https://github.com/smarty-php/smarty)
also known as (5)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (34)
External citations — patches, advisories, analysis.
- http://github.com/smarty-php/smarty/releases/tag/v4.1.1Patchcnnvd
- https://cxsecurity.com/cveshow/CVE-2022-29221/cnnvd
- https://github.com/smarty-php/smarty/commit/64ad6442ca1da31cefdab5c9874262b702cccdddcnnvd
- https://github.com/smarty-php/smarty/releases/tag/v3.1.45cnnvd
- https://github.com/smarty-php/smarty/releases/tag/v4.1.1cnnvd
- https://github.com/smarty-php/smarty/security/advisories/GHSA-634x-pc3q-cf4ccnnvd
- https://lists.debian.org/debian-lts-announce/2022/05/msg00044.htmlcnnvd
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BRAJVDRGCIY5UZ2PQHKDTT7RMKG6WJQQ/cnnvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan