CVE Vulnerabilities

CVE-2021-29454

Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

Published: Jan 10, 2022 | Modified: Nov 21, 2024
CVSS 3.x
8.8
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
6.5 MEDIUM
AV:N/AC:L/Au:S/C:P/I:P/A:P
RedHat/V2
RedHat/V3
Ubuntu
HIGH
root.io logo minimus.io logo echo.ai logo

Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Prior to versions 3.1.42 and 4.0.2, template authors could run arbitrary PHP code by crafting a malicious math string. If a math string was passed through as user provided data to the math function, external users could run arbitrary PHP code by crafting a malicious math string. Users should upgrade to version 3.1.42 or 4.0.2 to receive a patch.

Weakness

The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.

Affected Software

NameVendorStart VersionEnd Version
SmartySmarty*3.1.42 (excluding)
SmartySmarty4.0.0 (including)4.0.2 (excluding)
Smarty3Ubuntubionic*
Smarty3Ubuntudevel*
Smarty3Ubuntuesm-apps/bionic*
Smarty3Ubuntuesm-apps/focal*
Smarty3Ubuntuesm-apps/jammy*
Smarty3Ubuntuesm-apps/noble*
Smarty3Ubuntuesm-apps/xenial*
Smarty3Ubuntufocal*
Smarty3Ubuntuhirsute*
Smarty3Ubuntuimpish*
Smarty3Ubuntujammy*
Smarty3Ubuntukinetic*
Smarty3Ubuntulunar*
Smarty3Ubuntumantic*
Smarty3Ubuntunoble*
Smarty3Ubuntuoracular*
Smarty3Ubuntuplucky*
Smarty3Ubuntutrusty*
Smarty3Ubuntuupstream*
Smarty3Ubuntuxenial*

Potential Mitigations

References