Vulnerability in Smarty
CVE-2021-29454
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.
Published · last modified .
CVSS v3 metric
CVSS v3 base score 8.1 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N.
EPSS exploit prediction
EPSS: 0.019 (79.3th percentile), scored .
Low probability of exploitation in the next 30 days, but still tracked. 79th percentile — 79.3% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.019 · newest: 0.019 · change: -0.001
Affected products
- Smarty
- Smarty-Php Smarty — versions < 3.1.42, >= 4.0.0, < 4.0.2
- Debian Linux — versions 9.0, 10.0, 11.0
- Fedoraproject Fedora — versions 36, 37
Weakness classification (CWE)
Public proof-of-concept exploits
References
- github.com/smarty-php/smarty/security/advisories/GHSA-29gp-2c3m-3j6m (Third Party Advisory)
- github.com/smarty-php/smarty/commit/215d81a9fa3cd63d82fb3ab56ecaf97cf1e7db71 (Patch, Third Party Advisory)
- github.com/smarty-php/smarty/releases/tag/v3.1.42 (Third Party Advisory, Release Notes)
- github.com/smarty-php/smarty/releases/tag/v4.0.2 (Third Party Advisory, Release Notes)
- packagist.org/packages/smarty/smarty (Product, Third Party Advisory)
- www.smarty.net/docs/en/language.function.math.tpl (Vendor Advisory)
- lists.debian.org/debian-lts-announce/2022/05/msg00005.html (mailing-list, Mailing List, Third Party Advisory)
- www.debian.org/security/2022/dsa-5151 (vendor-advisory, Third Party Advisory)
- security.gentoo.org/glsa/202209-09 (vendor-advisory, Third Party Advisory)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/… (vendor-advisory)
Frequently asked questions
- What is CVE-2021-29454?
- CVE-2021-29454 is a high-severity vulnerability in Smarty, classified under Improper Neutralization of Special Elements in Output Used by a Downstream Component (Injection). CVSS score: 8.1/10. Published 2022-01-10.
- How severe is CVE-2021-29454?
- High severity. CVSS v3 base score is 8.1 out of 10.
- Is CVE-2021-29454 known to be exploited?
- 2 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.