578
VMScore

CVE-2022-29221

Published: 24/05/2022 Updated: 07/11/2023
CVSS v2 Base Score: 6.5 | Impact Score: 6.4 | Exploitability Score: 8
CVSS v3 Base Score: 8.8 | Impact Score: 5.9 | Exploitability Score: 2.8
VMScore: 578
Vector: AV:N/AC:L/Au:S/C:P/I:P/A:P

Vulnerability Summary

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.

Vulnerability Trend

Vulnerable Product Search on Vulmon Subscribe to Product

smarty smarty

debian debian linux 9.0

debian debian linux 10.0

debian debian linux 11.0

fedoraproject fedora 36

fedoraproject fedora 37

Vendor Advisories

Debian Bug report logs - #1011757 smarty4: CVE-2022-29221 - template authors can inject php code by choosing malicious filenames Package: src:smarty4; Maintainer for src:smarty4 is Mike Gabriel <sunweaver@debianorg>; Reported by: Neil Williams <codehelp@debianorg> Date: Thu, 26 May 2022 12:33:01 UTC Severity: impo ...
Several security vulnerabilities have been discovered in smarty3, the compiling PHP template engine Template authors are able to run restricted static php methods or even arbitrary PHP code by crafting a malicious math string or by choosing an invalid {block} or {include} file name If a math string was passed through as user provided data to the ...

Github Repositories

CVE-2022-29221 Proof of Concept Code - Smarty RCE

CVE-2022-29221-PoC This is a very basic Smarty sceleton app with a single template that shows the Proof of Concept code for CVE-2022-29221 Injection Example Code: {block name="poc*/system('whoami');/*"}ABC{/block} See: githubcom/sbani/CVE-2022-29221-PoC/blob/main/template/indextpl After running the code, Sma