High severity8.8NVD Advisory· Published May 24, 2022· Updated Jun 17, 2026
CVE-2022-29221
CVE-2022-29221
Description
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
smarty/smartyPackagist | < 3.1.45 | 3.1.45 |
smarty/smartyPackagist | >= 4.0.0, < 4.1.1 | 4.1.1 |
Affected products
8cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*+ 1 more
- cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*
Patches
Vulnerability mechanics
References
14- github.com/smarty-php/smarty/commit/64ad6442ca1da31cefdab5c9874262b702cccdddnvdPatchThird Party AdvisoryWEB
- github.com/advisories/GHSA-634x-pc3q-cf4cghsaADVISORY
- github.com/smarty-php/smarty/releases/tag/v3.1.45nvdRelease NotesThird Party AdvisoryWEB
- github.com/smarty-php/smarty/releases/tag/v4.1.1nvdRelease NotesThird Party AdvisoryWEB
- github.com/smarty-php/smarty/security/advisories/GHSA-634x-pc3q-cf4cnvdThird Party AdvisoryWEB
- lists.debian.org/debian-lts-announce/2022/05/msg00044.htmlnvdMailing ListThird Party AdvisoryWEB
- nvd.nist.gov/vuln/detail/CVE-2022-29221ghsaADVISORY
- security.gentoo.org/glsa/202209-09nvdThird Party AdvisoryWEB
- www.debian.org/security/2022/dsa-5151nvdThird Party AdvisoryWEB
- github.com/FriendsOfPHP/security-advisories/blob/master/smarty/smarty/CVE-2022-29221.yamlghsaWEB
- lists.fedoraproject.org/archives/list/[email protected]/message/BRAJVDRGCIY5UZ2PQHKDTT7RMKG6WJQQghsaWEB
- lists.fedoraproject.org/archives/list/[email protected]/message/L777JIBIWJV34HS7LXPIDWASG7TT4LNIghsaWEB
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BRAJVDRGCIY5UZ2PQHKDTT7RMKG6WJQQ/nvd
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/L777JIBIWJV34HS7LXPIDWASG7TT4LNI/nvd
News mentions
0No linked articles in our index yet.