Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐘
🐘 Packagist
Not in CISA KEV
HIGH severity

CVE-2021-21408 — smarty

HIGHFix: smarty-php/smarty@19ae410

CVE-2021-21408 is a high-severity (CVSS 8.8) Improper Input Validation vulnerability in smarty/smarty. A fix is available for smarty/smarty — see the affected versions and patch details below.

Access to restricted PHP code by dynamic static class access in smarty

Also known asGHSA-4h9c-v5vg-5m6m
Published
Updated
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed
Exploitation data as of Oct 6, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • A successful exploit gives an attacker total control of the affected component, not partial access.
  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2021-21408.

EPSS Exploitation Probability

via FIRST.org ↗
2.2%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs82th percentile — riskier than 82% of all scored CVEsHighest risk
0.00%0.92%1.83%2.75%0.5%2.2%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2021-21408 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 385,738 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

2 pkgs affected
🐘smarty/smarty🐘smarty/smarty

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.

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 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

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
🐘Packagistsmarty/smartyall versions3.1.43composer require smarty/smarty:^3.1.43
🐘Packagistsmarty/smarty≥ 4.0.0&&< 4.0.34.0.3composer require smarty/smarty:^4.0.3

Affected Products

3 products · 7 configurations
OS
debian linuxdebian
3 versions
9.010.011.0
OS
fedorafedoraproject
2 versions
3637
Application
smartysmarty
≥ 4.0.0 && < 4.0.3
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for smarty/smarty, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update smarty/smarty to 3.1.43 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-21408 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Frequently Asked Questions

### 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)
O3 Security · Impact-Aware SCA

Is CVE-2021-21408 in your dependencies?

Find it across Packagist, including transitive dependencies.

CVE-2021-21408: smarty — Fixed in 3.1.43