BreachSpiderVerified, not vibes

CVE-2022-29221 in Debian Linux and 2 more products

High 8.8

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 ...

Affects 3 products from 3 vendors. Facts below cite their sources.

CVSS 3.18.8
EPSS4.1%
EPSS percentile92th
FixUnknown

Remotely exploitable over the network, low complexity, low privileges required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.

Affected products and versions

VendorProductAffected versions
Debian Debian Linux 9.0 10.0 11.0
Fedoraproject Fedora 36 37
Smarty Smarty < 3.1.45 ≥ 4.0.0, < 4.1.1

A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.

Fix and vendor advisory

No official vendor advisory link on record. See the CVE record.

Exploitation

CISA known-exploitedNot in the CISA KEV catalog
Public exploitNot confirmed

Official 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.

Source: NIST NVD / MITRE CVE.

Record details

CVE IDCVE-2022-29221
BreachSpider IDBS-2022-GLOBAL-068405-H
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Published2022-05-24
Last modified2026-06-17
Weakness (CWE)
SourceNVD

Weakness definitions

CWE-94: Code Injection

Attacker injects arbitrary code that is executed by the application process.

Related attack patterns (CAPEC)

CAPEC-35 Leverage Executable Code in Non-Executable Files via CWE-94

CAPEC-77 Manipulating User-Controlled Variables via CWE-94

CAPEC-242 Code Injection via CWE-94

Mapping is CWE to CAPEC per MITRE CAPEC 3.9.

Analysis AI-written, not human-reviewed

CVE-2022-29221 affects Smarty, a PHP template engine, by allowing template authors to inject PHP code through malicious {block} names or {include} file names in versions prior to 3.1.45 and 4.1.1.

An attacker can exploit this vulnerability by crafting a malicious template with a specially crafted {block} name or {include} file name, leading to arbitrary code execution if the template is processed by an affected version of Smarty.

Questions

What is CVE-2022-29221?

CVE-2022-29221 affects Smarty, a PHP template engine, by allowing template authors to inject PHP code through malicious {block} names or {include} file names in versions prior to 3.1.45 and 4.1.1.

What is the CVSS score for CVE-2022-29221?

CVE-2022-29221 has CVSS 8.8 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. EPSS: 4.1%.

Is CVE-2022-29221 actively exploited?

No confirmed active exploitation of CVE-2022-29221 as of 2026-09-25.

How do I remediate CVE-2022-29221?

Priority: IMMEDIATE.

What systems are affected by CVE-2022-29221?

CVE-2022-29221 affects Debian Debian Linux; Fedoraproject Fedora; Smarty Smarty.

For developers and AI agents

Run this check from your own code or agent

REST API

curl -s https://breachspider.com/api/v1/assets/correlate-cves \
 -H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"assets":[{"asset_id":"dev-1","vendor":"Debian","product":"Debian Linux","version":"1.0"}]}'

API reference

Python SDK

pip install breachspider

PyPI · GitHub

MCP for AI agents

# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp

Setup for Claude, ChatGPT, Cursor

Free trial: 14 days, 750 device checks, no card.

Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.