CVE-2022-29221: Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application l
CVE-2022-29221 is a high-severity flaw (CVSS 8.8) affecting smarty, debian linux, fedora. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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.
Why this priority
- High severity
- EPSS top 8%: very likely to be exploited
- On your watchlist
A fixed release or distro patch exists.
Risk facts
| CVSS score | 8.8 (High) |
| Attack vector | Network (remote) |
| Attack complexity | Low |
| Privileges needed | Low |
| User interaction | None |
| EPSS exploit chance | 4.9% (top 8%) |
| CISA exploited list | No |
| Weakness | CWE-94 |
| Published | 2022-05-24 |
| Last modified | 2026-06-17 |
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2022-29221?
smarty: upgrade to 3.1.45, 4.1.1; debian linux: mitigate or apply the listed mitigation; fedora: mitigate or apply the listed mitigation. Exact commands for each OS are on this page.
Is CVE-2022-29221 being exploited?
CVE-2022-29221 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2022-29221 affect?
CVE-2022-29221 affects smarty, debian linux, fedora. Severity is high (CVSS 8.8). 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}
How urgent is CVE-2022-29221?
Priority 59/100. High severity; EPSS top 8%: very likely to be exploited; On your watchlist
Software pages
PHP vulnerabilities · Debian vulnerabilities
Related CVEs
- CVE-2023-41661 MEDIUM 5.9 UPGRADE Auth
- CVE-2023-28447 HIGH 7.1 UPGRADE MITIGATE Smarty is a template engine for PHP
- CVE-2021-29454 HIGH 8.1 UPGRADE MITIGATE Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application l
- CVE-2021-26120 CRITICAL 9.8 UPGRADE MITIGATE Smarty before 3.1.39 allows code injection via an unexpected function name after a {function name= substring.
- CVE-2021-26119 HIGH 7.5 UPGRADE MITIGATE Smarty before 3.1.39 allows a Sandbox Escape because $smarty.template_object can be accessed in sandbox mode.