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

CVE-2021-26120 — smarty

CRITICALFix: smarty-php/smarty@165f1bd

CVE-2021-26120 is a critical-severity (CVSS 9.8) Code Injection vulnerability in smarty/smarty. EPSS puts its 30-day exploitation probability at 82.3% (100th percentile). A fix is available for smarty/smarty — see the affected versions and patch details below.

PHP Code Injection by malicious function name in smarty

Also known asGHSA-3rpf-5rqv-689q
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 10, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
82.3%probability of exploitation in next 30 days
Very High Risk0.00%
Lower risk than most CVEs100th percentile — riskier than 100% of all scored CVEsHighest risk
73.6%77.2%80.7%84.3%75.6%82.3%Apr 26Aug 26Oct 26

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

How urgent is this, really

CVE-2021-26120 by exploitation likelihood (EPSS) against impact (CVSS). In the shaded patch-first corner (EPSS 50%+, CVSS 7.0+).

Where this sits among everything scored

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

Real-World Exposure

1 pkg affected
🐘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

Template authors could inject php code by choosing a malicous {function} name. Sites that cannot fully trust template authors should update as soon as possible. Please upgrade to 3.1.39 or higher.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐘Packagistsmarty/smartyall versions3.1.39composer require smarty/smarty:^3.1.39

Affected Products

2 products · 4 configurations
OS
debian linuxdebian
3 versions
9.010.011.0
Application
smartysmarty
< 3.1.39
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.39 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-26120 is resolved across your whole dependency graph.

  3. Workarounds

    Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Frequently Asked Questions

Template authors could inject php code by choosing a malicous {function} name. Sites that cannot fully trust template authors should update as soon as possible. Please upgrade to 3.1.39 or higher.
O3 Security · Impact-Aware SCA

Is CVE-2021-26120 in your dependencies?

Find it across Packagist, including transitive dependencies.

CVE-2021-26120: smarty — Fixed in 3.1.39