Vulnerabilities · 2021 · Smarty
CVE-2021-29454
Smarty vulnerability
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.
Affected products
Smarty, Debian Linux, Fedora. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Smarty runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- www.smarty.net/docs/en/language.function.math.tpl · Vendor Advisory
- github.com/smarty-php/smarty/commit/215d81a9fa3cd63d82fb3ab56ecaf97cf1e7db71 · Patch
- github.com/smarty-php/smarty/releases/tag/v3.1.42 · Third Party Advisory
- github.com/smarty-php/smarty/releases/tag/v4.0.2 · Third Party Advisory
- github.com/smarty-php/smarty/security/advisories/GHSA-29gp-2c3m-3j6m · Third Party Advisory
- lists.debian.org/debian-lts-announce/2022/05/msg00005.html · Third Party Advisory
- packagist.org/packages/smarty/smarty · Third Party Advisory
- security.gentoo.org/glsa/202209-09 · Third Party Advisory
- nvd.nist.gov/vuln/detail/CVE-2021-29454
- cve.org/CVERecord?id=CVE-2021-29454
More vulnerabilities in Smarty products
CVE-2023-41661CVE-2023-28447CVE-2022-29221CVE-2021-26120CVE-2021-26119CVE-2021-21408CVE-2018-25047CVE-2018-16831All 31
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.