CVE-2021-29454
Description
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.
How to fix
- smarty smarty3.1.42, 4.0.2 or later
- smarty/smarty3.1.42, 4.0.2 or later
- debian.org/security/2022/dsa-5151
- security.gentoo.org/glsa/202209-09
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/L777JIBIWJV34HS7LXPIDWASG7TT4LNI/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BRAJVDRGCIY5UZ2PQHKDTT7RMKG6WJQQ/
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| smarty smarty | v < 3.1.42, 4.0.0 ≤ v < 4.0.2 | 3.1.42, 4.0.2 |
| debian debian_linux | 9.0, 10.0, 11.0 | — |
| fedoraproject fedora | 36, 37 | — |
| smarty/smartyPackagist | v < 3.1.42, 4.0.0 ≤ v < 4.0.2 | 3.1.42, 4.0.2 |
Check your version
Choose the product and enter the version you run to see whether it falls in the affected range.
Attack Surface Management
See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.