CVE-2021-21408Smarty
High 8.8
Follow: this CVE · Smarty · Smarty We alert you by email or Slack (account required).
- Priority
- 53
- CVSS 3.1
- 8.8
- EPSS
- 2.1% probability of exploitation in 30 days · percentile 83
- Auth required
- Yes
- Published
- Jan 10, 2022
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-20
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
What happens
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.
What to do
- Apply the vendor's security update for Smarty.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Packagist | smarty/smarty |
< 3.1.43 |
3.1.43 |
composer require "smarty/smarty:^3.1.43" |
| Packagist | smarty/smarty |
≥ 4.0.0 < 4.0.3 |
4.0.3 |
composer require "smarty/smarty:^4.0.3" |
Per OSV / GitHub Advisories (GHSA-4h9c-v5vg-5m6m). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| smarty | smarty | < 3.1.43 |
| smarty | smarty | ≥ 4.0.0 < 4.0.3 |
| debian | debian_linux | 9.0 |
| debian | debian_linux | 10.0 |
| debian | debian_linux | 11.0 |
| fedoraproject | fedora | 36 |
| fedoraproject | fedora | 37 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- github.com Release Notes Third Party Advisory
- github.com Release Notes Third Party Advisory
- github.com Third Party Advisory
- lists.debian.org Mailing List Third Party Advisory
- lists.fedoraproject.org
- lists.fedoraproject.org
- security.gentoo.org Third Party Advisory
- www.debian.org Third Party Advisory