Back
CVE-2021-29454
Sandbox Escape by math function in smarty
High8.1EPSS 1.9%
- Published
- Updated
- Reserved
- Assigned by
- GitHub_M
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.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | High8.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N |
| NVDNVD · Modified | 3.1 | High8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 1.9% · top 21% of all CVEs (7 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: total
Loading the EPSS history…
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 8.1.
Weakness
Affected products
- affected < 3.1.42
- affected >= 4.0.0, < 4.0.2
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Packagistsmarty/smartyGHSA-29gp-2c3m-3j6m (opens in a new tab)
References (11)
- https://github.com/smarty-php/smarty/security/advisories/GHSA-29gp-2c3m-3j6m (opens in a new tab)x_transferred
- https://github.com/smarty-php/smarty/commit/215d81a9fa3cd63d82fb3ab56ecaf97cf1e7db71 (opens in a new tab)x_transferred
- https://github.com/smarty-php/smarty/releases/tag/v3.1.42 (opens in a new tab)x_transferred
- https://github.com/smarty-php/smarty/releases/tag/v4.0.2 (opens in a new tab)x_transferred
- https://packagist.org/packages/smarty/smarty (opens in a new tab)x_transferred
- https://www.smarty.net/docs/en/language.function.math.tpl (opens in a new tab)x_transferred
- [debian-lts-announce] 20220505 [SECURITY] [DLA 2995-1] smarty3 security update (opens in a new tab)mailing-listx_transferred
- DSA-5151 (opens in a new tab)vendor-advisoryx_transferred
- GLSA-202209-09 (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2022-52154efd61 (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2022-d5fc9dcdd7 (opens in a new tab)vendor-advisoryx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-29gp-2c3m-3j6m (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2021-29454)Record last updated .