CVE-2022-29221 - CVE House
Back to Database
Status published High CVE-2022-29221

PHP Code Injection by malicious block or filename in Smarty

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

Impact Analysis

Refer to official advisory for detailed impact metrics.

Remediation

Ensure systems are updated to the latest vendor-supplied patch levels.

THREAT MONITOR

Am I Vulnerable?

Launch our assessment wizard to check if your infrastructure is exposed to • CVE-2022-29221

Credits & Attribution

No credits recorded in the NVD database.

Affected Vendor

Affected Software

smarty
Vulnerable Versions:
< 3.1.45, >= 4.0.0, < 4.1.1

Timeline

Official Publish: May 24th, 2022
Last Modified: April 23rd, 2025
Added to House: July 21st, 2026

CVSS Vectors

V3: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Weaknesses (CWE)