CVE-2022-29221
published high CVSS 3.1 · 8.8PHP Code Injection by malicious block or filename in Smarty
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| smarty-php | — | smarty< 3.1.45 · >= 4.0.0, < 4.1.1 | Affected | Not stated | GitHub_M |
| Debian | bullseye | smarty3 | Advisory build | 3.1.39-2+deb11u1 | DSA-5151-1 |
| Ubuntu | bionic | postfixadmin | Advisory build | 3.0.2-2ubuntu0.1~esm1 | USN-6550-1 |
| Debian | buster | smarty3 | Advisory build | 3.1.33+20180830.1.3a78a21f+selfpack1-1+deb10u1 | DSA-5151-1 |
| Debian | stretch | smarty3 | Advisory build | 3.1.31+20161214.1.c7d42e4+selfpack1-2+deb9u6 | DLA-3033-1 |
| Ubuntu | focal | postfixadmin | Advisory build | 3.2.1-3ubuntu0.1~esm1 | USN-6550-1 |
| Ubuntu | jammy | postfixadmin | Advisory build | 3.3.10-2ubuntu0.1~esm1 | USN-6550-1 |
| Ubuntu | jammy | smarty3 | Advisory build | 3.1.39-2ubuntu1.22.04.1 | USN-6012-1 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 8.8 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| smarty-php | smarty | < 3.1.45 (affected)>= 4.0.0, < 4.1.1 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-94 CWE-94: Improper Control of Generation of Code ('Code Injection')
References
9- https://github.com/smarty-php/smarty/commit/64ad6442ca1da31cefdab5c9874262b702cccddd
- https://github.com/smarty-php/smarty/releases/tag/v3.1.45
- https://github.com/smarty-php/smarty/releases/tag/v4.1.1
- https://github.com/smarty-php/smarty/security/advisories/GHSA-634x-pc3q-cf4c
- [debian-lts-announce] 20220529 [SECURITY] [DLA 3033-1] smarty3 security update https://lists.debian.org/debian-lts-announce/2022/05/msg00044.html
- FEDORA-2022-d5fc9dcdd7 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BRAJVDRGCIY5UZ2PQHKDTT7RMKG6WJQQ/
- FEDORA-2022-52154efd61 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/L777JIBIWJV34HS7LXPIDWASG7TT4LNI/
- GLSA-202209-09 https://security.gentoo.org/glsa/202209-09
- DSA-5151 https://www.debian.org/security/2022/dsa-5151
Provider assertions
3GitHub_M · cna
PHP Code Injection by malicious block or filename in Smarty
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 58e60f841a275d696a5a1125c3aea95d6546ab29b5dcef988361c3d7e8f9a474
- Ingested
- 23 Sep 2026, 07:59:45 UTC
- Source record
- Official CVE record