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.
CVE-2022-29221
This high-severity CVE scores 8.8 under NVD CVSS v3. EPSS exploit probability: 4.8%, top 9% of all CVEs by exploit prediction. GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).
- High severity, but no confirmed exploitation yet
A fix is available — apply it.
- CVSS v3
- 8.8
- EG Score
- 8.8(medium)
- EG Risk
- 56(Track)EG Risk 56/100SSVC: Track
EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).
How it’s computedSeverity88% × 45%Exploitation40% × 40%Automatability0% × 15%Action: Routine — remediate on your standard cadence. - EPSS PROB
- 5%
- EPSS %ILE
- 92%
- KEV
- Not listed
Published
May 24, 2022
Last Modified
November 21, 2024
Advisory Details (9)
Auto-updated Aug 27, 2026commit 64ad6442ca1d (smarty-php/smarty)
Patch available: smarty-php/smarty v4.5.1 (contains commit 64ad6442ca1d)
https://github.com/smarty-php/smarty/commit/64ad6442ca1da31cefdab5c9874262b702cccdddSmarty: Multiple vulnerabilities (GLSA 202209-09) — Gentoo security
https://security.gentoo.org/glsa/202209-09[SECURITY] Fedora 36 Update: php-Smarty-3.1.47-1.fc36 - package-announce - Fedora mailing-lists
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/L777JIBIWJV34HS7LXPIDWASG7TT4LNI/[SECURITY] Fedora 37 Update: php-Smarty-3.1.47-1.fc37 - package-announce - Fedora mailing-lists
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BRAJVDRGCIY5UZ2PQHKDTT7RMKG6WJQQ/[SECURITY] [DLA 3033-1] smarty3 security update
https://lists.debian.org/debian-lts-announce/2022/05/msg00044.htmlPHP Code Injection by malicious block or filename · Advisory · smarty-php/smarty · GitHub
https://github.com/smarty-php/smarty/security/advisories/GHSA-634x-pc3q-cf4cv4.1.1
Patch available: smarty-php/smarty v4.1.1
https://github.com/smarty-php/smarty/releases/tag/v4.1.1v3.1.45
Patch available: smarty-php/smarty v3.1.45
https://github.com/smarty-php/smarty/releases/tag/v3.1.45Patch Availability(2)
| Vendor / Ecosystem | Fixed in / Patch | Released | Source |
|---|---|---|---|
| ubuntu | smarty3 (3.1.39-2ubuntu1.22.10.1) @ kinetic | 2026-05-25 | ubuntu |
| ubuntu | postfixadmin (3.0.2-2ubuntu0.1~esm1) @ bionic | 2026-05-25 | ubuntu |
Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.
Affected Packages
(10 across 7 ecosystems)
Debian:12(2)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| smarty3 | — | 3.1.45-1 | — |
| smarty4 | — | 4.1.1-1 | — |
Debian:13(2)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| smarty3 | — | 3.1.45-1 | — |
| smarty4 | — | 4.1.1-1 | — |
Debian:14(2)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| smarty3 | — | 3.1.45-1 | — |
| smarty4 | — | 4.1.1-1 | — |
Debian:10(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| smarty3 | 3.1.33+20180830.1.3a78a21f+selfpack1-1 | 3.1.33+20180830.1.3a78a21f+selfpack1-1+deb10u1 | — |
Debian:11(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| smarty3 | 3.1.39-1, 3.1.39-2 | 3.1.39-2+deb11u1 | — |
Debian:9(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| smarty3 | 3.1.31+20161214.1.c7d42e4+selfpack1-2 ... 3.1.31+20161214.1.c7d42e4+selfpack1-2+deb9u5 (6 versions) | 3.1.31+20161214.1.c7d42e4+selfpack1-2+deb9u6 | — |
Packagist(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| smarty/smarty | v4.0.0 ... v4.1.0 (6 versions) | 4.1.1 | — |
Weakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
All Vendor Advisories
(2)
Every vendor that published an advisory referencing this CVE — pulled from our cve_vendor_advisories aggregation. Click any row for the vendor's original advisory page.
Data Freshness Timeline
(refreshed 6× in last 7d / 26× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
Showing the most recent 100 of 164 total refreshes for this CVE.
- 2026-09-24 21:46 UTCOSV refresh
- 2026-09-24 14:00 UTCEPSS rescore
- 2026-09-23 13:45 UTCEPSS rescore
- 2026-09-22 14:44 UTCEPSS rescore
- 2026-09-19 15:38 UTCEPSS rescore
- 2026-09-18 19:24 UTCEPSS rescore
- 2026-09-16 14:05 UTCEPSS rescore
- 2026-09-15 03:06 UTCEPSS rescore
- 2026-09-12 14:57 UTCEPSS rescore
- 2026-09-11 14:49 UTCEPSS rescore
- 2026-09-11 09:33 UTCEPSS rescore
- 2026-09-08 21:57 UTCEPSS rescore
- 2026-09-07 15:58 UTCEPSS rescore
- 2026-09-06 13:45 UTCEPSS rescore
- 2026-09-05 15:25 UTCEPSS rescore
- 2026-09-05 13:55 UTCOSV refresh
- 2026-09-04 13:57 UTCEPSS rescore
- 2026-09-04 13:57 UTCEPSS rescore
- 2026-09-04 05:04 UTCEPSS rescore
- 2026-09-02 14:09 UTCEPSS rescore
- 2026-09-01 13:51 UTCEPSS rescore
- 2026-08-30 19:14 UTCEPSS rescore
- 2026-08-30 01:19 UTCEPSS rescore
- 2026-08-28 21:38 UTCEPSS rescore
- 2026-08-27 14:22 UTCEPSS rescore
Show 75 moreShow fewer
- 2026-08-26 14:43 UTCEPSS rescore
- 2026-08-25 13:46 UTCEPSS rescore
- 2026-08-24 14:13 UTCEPSS rescore
- 2026-08-23 00:16 UTCEPSS rescore
- 2026-08-21 23:46 UTCEPSS rescore
- 2026-08-20 22:52 UTCEPSS rescore
- 2026-08-19 17:01 UTCEPSS rescore
- 2026-08-19 00:29 UTCOSV refresh
- 2026-08-18 13:45 UTCEPSS rescore
- 2026-08-17 13:44 UTCEPSS rescore
- 2026-08-16 14:53 UTCEPSS rescore
- 2026-08-16 02:11 UTCEPSS rescore
- 2026-08-15 01:27 UTCEPSS rescore
- 2026-08-13 21:57 UTCEPSS rescore
- 2026-08-12 13:48 UTCEPSS rescore
- 2026-08-11 13:38 UTCEPSS rescore
- 2026-08-09 13:44 UTCEPSS rescore
- 2026-08-08 16:34 UTCEPSS rescore
- 2026-08-07 16:24 UTCEPSS rescore
- 2026-08-06 13:44 UTCEPSS rescore
- 2026-08-05 19:15 UTCEPSS rescore
- 2026-08-04 15:07 UTCEPSS rescore
- 2026-08-04 10:35 UTCEPSS rescore
- 2026-08-03 19:57 UTCOSV refresh
- 2026-08-03 10:33 UTCEPSS rescore
- 2026-08-02 02:24 UTCEPSS rescore
- 2026-08-01 04:13 UTCEPSS rescore
- 2026-07-30 16:25 UTCEPSS rescore
- 2026-07-30 01:28 UTCEPSS rescore
- 2026-07-28 15:33 UTCEPSS rescore
- 2026-07-26 14:52 UTCEPSS rescore
- 2026-07-25 14:15 UTCEPSS rescore
- 2026-07-24 14:15 UTCEPSS rescore
- 2026-07-24 14:15 UTCEPSS rescore
- 2026-07-23 14:16 UTCEPSS rescore
- 2026-07-23 14:16 UTCEPSS rescore
- 2026-07-23 02:10 UTCEG score recompute
- 2026-07-22 22:57 UTCEG score recompute
- 2026-07-22 14:06 UTCEPSS rescore
- 2026-07-22 14:06 UTCEPSS rescore
- 2026-07-21 15:22 UTCEPSS rescore
- 2026-07-21 15:22 UTCEPSS rescore
- 2026-07-20 17:05 UTCEPSS rescore
- 2026-07-19 14:29 UTCEPSS rescore
- 2026-07-19 02:27 UTCEPSS rescore
- 2026-07-19 02:27 UTCEPSS rescore
- 2026-07-18 10:03 UTCEPSS rescore
- 2026-07-18 10:02 UTCEPSS rescore
- 2026-07-17 10:29 UTCOSV refresh
- 2026-07-16 17:00 UTCEPSS rescore
- 2026-07-15 16:56 UTCEPSS rescore
- 2026-07-15 16:56 UTCEPSS rescore
- 2026-07-15 01:58 UTCEPSS rescore
- 2026-07-15 01:58 UTCEPSS rescore
- 2026-07-13 22:27 UTCEPSS rescore
- 2026-07-13 06:11 UTCEPSS rescore
- 2026-07-13 06:11 UTCEPSS rescore
- 2026-07-12 05:44 UTCEPSS rescore
- 2026-07-12 05:44 UTCEPSS rescore
- 2026-07-11 08:25 UTCEPSS rescore
- 2026-07-11 08:25 UTCEPSS rescore
- 2026-07-09 19:07 UTCEPSS rescore
- 2026-07-08 15:12 UTCEPSS rescore
- 2026-07-07 13:44 UTCEPSS rescore
- 2026-07-06 16:25 UTCEPSS rescore
- 2026-07-06 16:25 UTCEPSS rescore
- 2026-07-06 02:21 UTCEPSS rescore
- 2026-07-06 02:21 UTCEPSS rescore
- 2026-07-05 02:28 UTCEPSS rescore
- 2026-07-05 02:28 UTCEPSS rescore
- 2026-07-04 06:29 UTCEPSS rescore
- 2026-07-04 06:29 UTCEPSS rescore
- 2026-07-01 15:04 UTCEPSS rescore
- 2026-06-30 23:20 UTCEPSS rescore
- 2026-06-30 23:20 UTCEPSS rescore
Publicly available exploits
(1 reference)Working exploit code is in the public domain (1 GitHub PoC). Defenders should treat patch urgency accordingly — public PoCs typically lead to mass-exploitation within 24-72 hours.
- GitHub PoCsbani/CVE-2022-29221-PoCFirst seen May 25, 2022
CVE-2022-29221 Proof of Concept Code - Smarty RCE
Open source ↗
Related CVEs
Related CVEs are temporarily unavailable — the same-product, same-vendor and same-CWE lists could not be loaded just now. That is not a sign that none exist; please retry shortly.
Frequently asked(5)
What is CVE-2022-29221?
When was CVE-2022-29221 disclosed?
Is CVE-2022-29221 actively exploited?
What is the CVSS score of CVE-2022-29221?
How do I remediate CVE-2022-29221?
Dependency Blast Radius
See which npm, PyPI, Go, and Maven packages are affected by CVE-2022-29221
Is Your Infrastructure Affected by CVE-2022-29221?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.