CVE-2021-21408
published high CVSS 3.1 · 8.8Access to restricted PHP code by dynamic static class access in smarty
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| smarty-php | — | smarty< 3.1.43 · >= 4.0.0, < 4.0.3 | Affected | Not stated | GitHub_M |
| Debian | bullseye | smarty3 | Advisory build | 3.1.39-2+deb11u1 | DSA-5151-1 |
| Ubuntu | bionic | smarty3 | Advisory build | 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1 | USN-5348-1 |
| Debian | buster | smarty3 | Advisory build | 3.1.33+20180830.1.3a78a21f+selfpack1-1+deb10u1 | DSA-5151-1 |
| Debian | stretch | smarty3 | Advisory build | 3.1.31+20161214.1.c7d42e4+selfpack1-2+deb9u5 | DLA-2995-1 |
| Ubuntu | focal | smarty3 | Advisory build | 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1~esm1 | USN-5348-3 |
| Ubuntu | xenial | smarty3 | Advisory build | 3.1.21-1ubuntu1+esm1 | USN-5348-2 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 8.8 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| smarty-php | smarty | < 3.1.43 (affected)>= 4.0.0, < 4.0.3 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-20 CWE-20: Improper Input Validation
References
9- 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
- https://github.com/smarty-php/smarty/security/advisories/GHSA-4h9c-v5vg-5m6m
- [debian-lts-announce] 20220505 [SECURITY] [DLA 2995-1] smarty3 security update https://lists.debian.org/debian-lts-announce/2022/05/msg00005.html
- FEDORA-2022-d5fc9dcdd7 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BRAJVDRGCIY5UZ2PQHKDTT7RMKG6WJQQ/
- FEDORA-2022-52154efd61 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/L777JIBIWJV34HS7LXPIDWASG7TT4LNI/
- GLSA-202209-09 https://security.gentoo.org/glsa/202209-09
- DSA-5151 https://www.debian.org/security/2022/dsa-5151
Provider assertions
3GitHub_M · cna
Access to restricted PHP code by dynamic static class access in smarty
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 37e0b7216fdaa892f9f783edd126643d3b9da003f451fbb96de5b6a55198eba1
- Ingested
- 23 Sep 2026, 07:52:31 UTC
- Source record
- Official CVE record