Servers and applications
CVE-2022-29221
PHP Code Injection by malicious block or filename
- Severity
- High 8.8
- Published
- 17 May 2022
- Last changed
- 17 Jun 2026
- Added to UpHeron
- 1 Nov 2026
- Fixed in
- 3.1.45, 4.1.1
- Also known as
- GHSA-634x-pc3q-cf4c
- Sources
- NVD, Project advisories (GitHub)
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…
Affected software
| Software | Affected versions |
|---|---|
SmartyServers and applications · cpe:a:smarty:smarty |
|
SmartyServers and applications · github:smarty-php/smarty |
|
References
- NVD https://nvd.nist.gov/vuln/detail/CVE-2022-29221
- CVE.org https://www.cve.org/CVERecord?id=CVE-2022-29221
- GitHub Advisory Database https://github.com/advisories/GHSA-634x-pc3q-cf4c
- github.com https://github.com/smarty-php/smarty/security/advisories/GHSA-634x-pc3q-cf4c