cve.bz

CVE-2022-29221 Code Injection

8.8 highEPSS 4.9%Fix available

High (8.8). EPSS 4.9% estimated probability of exploitation activity in the next 30 days. Fixed in smarty/smarty 3.1.45, 4.1.1.

On this page
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.

Severity

CVSS 3.1

8.8 high
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
4.9% (unchanged from 4.9% a week ago; 4.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 92nd percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2025-04-23. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-94 Improper Control of Generation of Code (Code Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-29221 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-29221?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-29221?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-29221 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
smarty:smartybefore 3.1.45
smarty:smartyfrom 4.0.0 before 4.1.1
debian:debian_linux9.0
debian:debian_linux10.0
debian:debian_linux11.0
fedoraproject:fedora36
fedoraproject:fedora37

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-634x-pc3q-cf4cPackagistsmarty/smarty<3.1.453.1.45
GHSA-634x-pc3q-cf4cPackagistsmarty/smarty>=4.0.0 <4.1.14.1.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9smarty33.1.31+20161214.1.c7d42e4+selfpack1-2+deb9u6DLA-3033-1
Debian10smarty33.1.33+20180830.1.3a78a21f+selfpack1-1+deb10u1DSA-5151-1
Debian11smarty33.1.39-2+deb11u1DSA-5151-1
Debian12, 13, 14smarty33.1.45-1DEBIAN-CVE-2022-29221
Debian12, 13, 14smarty44.1.1-1DEBIAN-CVE-2022-29221
Ubuntu16.04:LTSgosa, galette, collabtiveno fix listedUBUNTU-CVE-2022-29221
Ubuntu18.04:LTS, 20.04:LTS, 22.04:LTS and 4 moregosano fix listedUBUNTU-CVE-2022-29221
Ubuntu22.04:LTSsmarty33.1.39-2ubuntu1.22.04.1UBUNTU-CVE-2022-29221 USN-6012-1
UbuntuPro:16.04:LTS, Pro:18.04:LTS, Pro:20.04:LTSsmarty3no fix listedUBUNTU-CVE-2022-29221
UbuntuPro:18.04:LTSpostfixadmin3.0.2-2ubuntu0.1~esm1UBUNTU-CVE-2022-29221 USN-6550-1
UbuntuPro:20.04:LTSpostfixadmin3.2.1-3ubuntu0.1~esm1UBUNTU-CVE-2022-29221 USN-6550-1
UbuntuPro:22.04:LTSpostfixadmin3.3.10-2ubuntu0.1~esm1UBUNTU-CVE-2022-29221 USN-6550-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Attack patterns (CAPEC)

  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
  • CAPEC-242 Code Injection Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON