CVE-2022-29221PHP Code Injection by malicious block or filename in Smarty
- 8.8HighCVSS base score
- 4.9%Exploitation in 30 daysEPSS · top 7.7% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By GitHub_M
- 41 days later
· 41 days later
Published
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | High8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVDNVD · Modified | 3.1 | High8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 4.9% · top 7.7% of all CVEs (16 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 8.8.
Affected products
- affected < 3.1.45
- affected >= 4.0.0, < 4.1.1
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Packagistsmarty/smartyGHSA-634x-pc3q-cf4c (opens in a new tab)
References
References9
- https://github.com/smarty-php/smarty/security/advisories/GHSA-634x-pc3q-cf4c (opens in a new tab)x_transferred
- https://github.com/smarty-php/smarty/commit/64ad6442ca1da31cefdab5c9874262b702cccddd (opens in a new tab)x_transferred
- https://github.com/smarty-php/smarty/releases/tag/v3.1.45 (opens in a new tab)x_transferred
- https://github.com/smarty-php/smarty/releases/tag/v4.1.1 (opens in a new tab)x_transferred
- [debian-lts-announce] 20220529 [SECURITY] [DLA 3033-1] smarty3 security update (opens in a new tab)mailing-listx_transferred
- DSA-5151 (opens in a new tab)vendor-advisoryx_transferred
- GLSA-202209-09 (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2022-52154efd61 (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2022-d5fc9dcdd7 (opens in a new tab)vendor-advisoryx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2022-2696 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-634x-pc3q-cf4c (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2022-29221)Record last updated .