Back
CVE-2021-21408Access to restricted PHP code by dynamic static class access in smarty
- 8.8HighCVSS base score
- 2.1%Exploitation in 30 daysEPSS · top 18% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By GitHub_M
- 13 months later
· 13 months later
Published
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | High8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVDNVD · Modified | 3.1 | High8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 2.1% · top 18% of all CVEs (18 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: total
Loading the EPSS history…
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 8.8.
Affected products
- affected < 3.1.43
- affected >= 4.0.0, < 4.0.3
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Packagistsmarty/smartyGHSA-4h9c-v5vg-5m6m (opens in a new tab)
References
References9
- https://github.com/smarty-php/smarty/security/advisories/GHSA-4h9c-v5vg-5m6m (opens in a new tab)x_transferred
- https://github.com/smarty-php/smarty/commit/19ae410bf56007a5ef24441cdc6414619cfaf664 (opens in a new tab)x_transferred
- https://github.com/smarty-php/smarty/releases/tag/v3.1.43 (opens in a new tab)x_transferred
- https://github.com/smarty-php/smarty/releases/tag/v4.0.3 (opens in a new tab)x_transferred
- [debian-lts-announce] 20220505 [SECURITY] [DLA 2995-1] smarty3 security update (opens in a new tab)mailing-listx_transferred
- DSA-5151 (opens in a new tab)vendor-advisoryx_transferred
- GLSA-202209-09 (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2022-52154efd61 (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2022-d5fc9dcdd7 (opens in a new tab)vendor-advisoryx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2022-0443 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-4h9c-v5vg-5m6m (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2021-21408)Record last updated .