cve.bz

CVE-2021-21408 Improper Input Validation

8.8 highEPSS 2.1%Fix available

High (8.8). EPSS 2.1% estimated probability of exploitation activity in the next 30 days. Fixed in smarty/smarty 3.1.43, 4.0.3.

On this page
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.

Severity

CVSS 3.1

8.8 high
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
2.1% (unchanged from 2.1% a week ago; 2.1% 30 days ago) estimated probability of exploitation activity in the next 30 days; 83rd percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2025-04-23. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-20 Improper Input Validation
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-21408 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-21408?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-21408?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-21408 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
smarty:smartybefore 3.1.43
smarty:smartyfrom 4.0.0 before 4.0.3
debian:debian_linux9.0
debian:debian_linux10.0
debian:debian_linux11.0
fedoraproject:fedora36
fedoraproject:fedora37

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-4h9c-v5vg-5m6mPackagistsmarty/smarty<3.1.433.1.43
GHSA-4h9c-v5vg-5m6mPackagistsmarty/smarty>=4.0.0 <4.0.34.0.3

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9smarty33.1.31+20161214.1.c7d42e4+selfpack1-2+deb9u5DLA-2995-1
Debian10smarty33.1.33+20180830.1.3a78a21f+selfpack1-1+deb10u1DSA-5151-1
Debian11smarty33.1.39-2+deb11u1DSA-5151-1
Debian12, 13, 14smarty33.1.45-1DEBIAN-CVE-2021-21408
Debian12, 13, 14smarty44.1.1-1DEBIAN-CVE-2021-21408
Ubuntu18.04:LTSsmarty33.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1UBUNTU-CVE-2021-21408 USN-5348-1
Ubuntu22.04:LTSsmarty33.1.39-2ubuntu1UBUNTU-CVE-2021-21408
UbuntuPro:16.04:LTSsmarty33.1.21-1ubuntu1+esm1UBUNTU-CVE-2021-21408 USN-5348-2
UbuntuPro:20.04:LTSsmarty33.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1~esm1UBUNTU-CVE-2021-21408 USN-5348-3

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-20 (51).

References

Check your stackJSON