CVE-2021-21408
HIGH8.8EPSS 0.47%Access to restricted PHP code by dynamic static class access in smarty
Published: 1/12/2022Modified: 3/13/2026
Also known as:GHSA-4h9c-v5vg-5m6m
Description
### 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](https://www.smarty.net/docs/en/advanced.features.tpl#advanced.features.security) 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](https://github.com/smarty-php/smarty)
Affected packages (5)
- Debian/smarty3from 0, < 3.1.39-2+deb11u1
- Debian/smarty3from 0, < 3.1.31+20161214.1.c7d42e4+selfpack1-2+deb9u5
- Debian/smarty3from 0, < 3.1.33+20180830.1.3a78a21f+selfpack1-1+deb10u1
- Debian/smarty4from 0, < 4.1.1-1
- Packagist/smarty/smartyfrom 0, < 3.1.43
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | HIGH8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
References (13)
- ADVISORYhttps://nvd.nist.gov/vuln/detail/CVE-2021-21408
- ADVISORYhttps://security-tracker.debian.org/tracker/CVE-2021-21408
- PATCHhttps://github.com/smarty-php/smarty
- WEBhttps://github.com/FriendsOfPHP/security-advisories/blob/master/smarty/smarty/CVE-2021-21408.yaml
- WEBhttps://github.com/smarty-php/smarty/commit/19ae410bf56007a5ef24441cdc6414619cfaf664
- WEBhttps://github.com/smarty-php/smarty/releases/tag/v3.1.43
- WEBhttps://github.com/smarty-php/smarty/releases/tag/v4.0.3
- WEBhttps://github.com/smarty-php/smarty/security/advisories/GHSA-4h9c-v5vg-5m6m
- WEBhttps://lists.debian.org/debian-lts-announce/2022/05/msg00005.html
- WEBhttps://lists.fedoraproject.org/archives/list/[email protected]/message/BRAJVDRGCIY5UZ2PQHKDTT7RMKG6WJQQ
- WEBhttps://lists.fedoraproject.org/archives/list/[email protected]/message/L777JIBIWJV34HS7LXPIDWASG7TT4LNI
- WEBhttps://security.gentoo.org/glsa/202209-09
- WEBhttps://www.debian.org/security/2022/dsa-5151