PT-2021-6745 · Smarty+2 · Smarty+2

Highwisskid

·

Published

2021-03-30

·

Updated

2022-12-08

·

CVE-2021-29454

CVSS v2.0

9.0

High

VectorAV:N/AC:L/Au:S/C:C/I:C/A:C
Name of the Vulnerable Software and Affected Versions Smarty versions prior to 3.1.42 and 4.0.2
Description The issue is related to the incorrect handling of code generation in the Smarty template engine for PHP. This allows template authors to run arbitrary PHP code by crafting a malicious math string. If a math string is passed through as user-provided data to the math function, external users could run arbitrary PHP code by crafting a malicious math string.
Recommendations To resolve the issue, users should upgrade to version 3.1.42 or 4.0.2 to receive a patch. As a temporary workaround, consider restricting the use of the math function to minimize the risk of exploitation. Avoid using user-provided data in the math function until the issue is resolved.

Exploit

Fix

Special Elements Injection

Code Injection

Weakness Enumeration

Related Identifiers

BDU:2022-02129
CVE-2021-29454
DLA-2995-1
DSA-5151-1
GHSA-29GP-2C3M-3J6M
MGASA-2022-0127
USN-5348-1
USN-5348-2
USN-5348-3

Affected Products

Linuxmint
Smarty
Ubuntu