Vulnerability · Published Jan 10, 2022 · Assigned by GitHub_M
CVE-2021-21408Access to restricted PHP code by dynamic static class access in smarty
High 8.8
In plain English
A high-severity improper input validation in smarty from smarty-php. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.1% (higher than 82% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Severity (CVSS 3.1)8.8High
Exploit odds (30 days)2.1%top 17.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | smarty3 | 3.1.45-1 | DEBIAN-CVE-2021-21408 |
| Debian:13 | smarty3 | 3.1.45-1 | DEBIAN-CVE-2021-21408 |
| Debian:14 | smarty3 | 3.1.45-1 | DEBIAN-CVE-2021-21408 |
| Debian:12 | smarty4 | 4.1.1-1 | DEBIAN-CVE-2021-21408 |
| Debian:13 | smarty4 | 4.1.1-1 | DEBIAN-CVE-2021-21408 |
| Debian:14 | smarty4 | 4.1.1-1 | DEBIAN-CVE-2021-21408 |
| Packagist | smarty/smarty | 3.1.43 | GHSA-4h9c-v5vg-5m6m |
| Packagist | smarty/smarty | 4.0.3 | GHSA-4h9c-v5vg-5m6m |
| Ubuntu:22.04:LTS | smarty3 | 3.1.39-2ubuntu1 | UBUNTU-CVE-2021-21408 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| smarty-php | smarty | < 3.1.43>= 4.0.0, < 4.0.3 |
Weakness: CWE-20 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
References
- https://github.com/smarty-php/smarty/security/advisories/GHSA-4h9c-v5vg-5m6m
- https://github.com/smarty-php/smarty/commit/19ae410bf56007a5ef24441cdc6414619cfaf664
- https://github.com/smarty-php/smarty/releases/tag/v3.1.43
- https://github.com/smarty-php/smarty/releases/tag/v4.0.3
- [debian-lts-announce] 20220505 [SECURITY] [DLA 2995-1] smarty3 security update mailing-list
- DSA-5151 vendor-advisory
- GLSA-202209-09 vendor-advisory
- FEDORA-2022-52154efd61 vendor-advisory
- FEDORA-2022-d5fc9dcdd7 vendor-advisory