CVE-2021-29454
Sandbox Escape by math function in smarty
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
Descriptions
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.
Smarty es un motor de plantillas para PHP que facilita la separación de la presentación (HTML/CSS) de la lógica de la aplicación. Antes de las versiones 3.1.42 y 4.0.2, los autores de plantillas podían ejecutar código PHP arbitrario al diseñar una cadena matemática maliciosa. Si era pasada una cadena matemática como datos proporcionados por el usuario a la función matemática, los usuarios externos podían ejecutar código PHP arbitrario al diseñar una cadena matemática maliciosa. Los usuarios deben actualizar a la versión 3.1.42 o 4.0.2 para recibir un parche
Several security vulnerabilities have been discovered in smarty3, the compiling PHP template engine. Template authors are able to run restricted static php methods or even arbitrary PHP code by crafting a malicious math string or by choosing an invalid {block} or {include} file name. If a math string was passed through as user provided data to the math function, remote users were able to run arbitrary PHP code as well.
CVSS Scores
SSVC
- Decision:-
Timeline
- 2021-03-30 CVE Reserved
- 2022-01-10 CVE Published
- 2024-08-03 CVE Updated
- 2025-03-30 EPSS Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
- ---------- First Exploit
CWE
- CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
CAPEC
References (11)
URL | Tag | Source |
---|---|---|
https://github.com/smarty-php/smarty/releases/tag/v3.1.42 | Release Notes | |
https://github.com/smarty-php/smarty/releases/tag/v4.0.2 | Release Notes | |
https://github.com/smarty-php/smarty/security/advisories/GHSA-29gp-2c3m-3j6m | Third Party Advisory | |
https://lists.debian.org/debian-lts-announce/2022/05/msg00005.html | Mailing List |
|
https://packagist.org/packages/smarty/smarty | Product |
URL | Date | SRC |
---|
URL | Date | SRC |
---|---|---|
https://github.com/smarty-php/smarty/commit/215d81a9fa3cd63d82fb3ab56ecaf97cf1e7db71 | 2023-11-07 |
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Smarty Search vendor "Smarty" | Smarty Search vendor "Smarty" for product "Smarty" | < 3.1.42 Search vendor "Smarty" for product "Smarty" and version " < 3.1.42" | - |
Affected
| ||||||
Smarty Search vendor "Smarty" | Smarty Search vendor "Smarty" for product "Smarty" | >= 4.0.0 < 4.0.2 Search vendor "Smarty" for product "Smarty" and version " >= 4.0.0 < 4.0.2" | - |
Affected
| ||||||
Debian Search vendor "Debian" | Debian Linux Search vendor "Debian" for product "Debian Linux" | 9.0 Search vendor "Debian" for product "Debian Linux" and version "9.0" | - |
Affected
| ||||||
Debian Search vendor "Debian" | Debian Linux Search vendor "Debian" for product "Debian Linux" | 10.0 Search vendor "Debian" for product "Debian Linux" and version "10.0" | - |
Affected
| ||||||
Debian Search vendor "Debian" | Debian Linux Search vendor "Debian" for product "Debian Linux" | 11.0 Search vendor "Debian" for product "Debian Linux" and version "11.0" | - |
Affected
| ||||||
Fedoraproject Search vendor "Fedoraproject" | Fedora Search vendor "Fedoraproject" for product "Fedora" | 36 Search vendor "Fedoraproject" for product "Fedora" and version "36" | - |
Affected
| ||||||
Fedoraproject Search vendor "Fedoraproject" | Fedora Search vendor "Fedoraproject" for product "Fedora" | 37 Search vendor "Fedoraproject" for product "Fedora" and version "37" | - |
Affected
|