8.8high
Access to restricted PHP code by dynamic static class access in smarty
- Severity
- 8.8high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 2.14% (higher than 82% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-4h9c-v5vg-5m6m
Description
Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Prior to versions 3.1.43 and 4.0.3, template authors could run restricted static php methods. Users should upgrade to version 3.1.43 or 4.0.3 to receive a patch.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| smarty-php smarty | < 3.1.43, >= 4.0.0, < 4.0.3 | CVE List |
| smarty/smarty (Packagist) | before 3.1.43, from 4.0.0 before 4.0.3 | GitHub Advisory Database |
| smarty smarty | before 3.1.43, from 4.0.0 before 4.0.3 | NVD |
| debian debian_linux | 9.0, 10.0, 11.0 | NVD |
| fedoraproject fedora | 36, 37 | NVD |
All scores
| GitHub_M | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 6.5medium CVSS:2.0 | AV:N/AC:L/Au:S/C:P/I:P/A:P |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Prior to versions 3.1.43 and 4.0.3, template authors could run restricted static php methods. Users should upgrade to version 3.1.43 or 4.0.3 to receive a patch.
GitHub Advisory Database
Impact
Template authors could run restricted static php methods.
Patches
Please upgrade to 3.1.40 or higher.
References
See the documentation on Smarty security features on the static_classes access filter.
For more information
If you have any questions or comments about this advisory please open an issue in the Smarty repo
NVD (es)
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.43 y 4.0.3, los autores de plantillas podían ejecutar métodos estáticos restringidos de php. Los usuarios deben actualizar a la versión 3.1.43 o 4.0.3 para recibir el parche
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-21408 changed 2025-04-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-4h9c-v5vg-5m6m changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2021-21408 changed 2026-06-17 | Public domain |