CVE-2022-29221

PHP Code Injection by malicious block or filename in Smarty

HIGH
8.8
CVSS Score
Published: May 24, 2022 at 12:00 AM UTC
Updated: June 17, 2026 at 04:39 AM UTC
4 products affected across 4 vendorsDebian LinuxFedoraSmarty

Using smarty by smarty-php?

Get instant alerts when new vulnerabilities affect smarty - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH8.8
Exploit prediction
EPSS 5%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 3.1.454.0.0 ≤ v < 4.1.1
Affected range stops below 3.1.45, so it looks safe — our inference, not a vendor statement
Affected range stops below 4.1.1, so it looks safe — our inference, not a vendor statement
v < 3.1.45v < 4.1.1
Affected range stops below 3.1.45, so it looks safe — our inference, not a vendor statement
Affected range stops below 4.1.1, so it looks safe — our inference, not a vendor statement

SSVC — Action Prioritization

SSVCNo known exploitNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

8.8HIGHGitHub_M
Attack Vector
NETWORK
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-94

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card