Skip to content
Fencer Intel
critical 9.8

CVE-2021-26120 in the critical feed json

PHP Code Injection by malicious function name in smarty

published 5y ago modified 4mo ago also GHSA-3rpf-5rqv-689q , EUVD-2021-0528

cvss
9.8
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
82.3%
EPSS 82.3% chance of exploitation in 30 days, percentile 99.6%
public exploits
0
none known

Summary

Smarty before 3.1.39 allows code injection via an unexpected function name after a {function name= substring.

Patch / fix

  • packagist smarty/smarty 3.1.39
  • smarty smarty 3.1.39
  • smarty3 Debian 14, Debian 13, Debian 12 3.1.39-1

debian advisories DEBIAN-CVE-2021-26120

  • smarty3 Ubuntu 18.04 LTS 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1
  • smarty3 Ubuntu Pro 16.04 LTS 3.1.21-1ubuntu1+esm1
  • smarty3 Ubuntu Pro 20.04 LTS 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1~esm1

ubuntu advisories UBUNTU-CVE-2021-26120

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Is CVE-2021-26120 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Exploit prediction

82.32% chance of exploitation in the next 30 days, higher than 99.6% of all scored CVEs (FIRST EPSS, 2026-11-09).

CVSS scores

assigned by version score vector
NVD 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 2.0 7.5 AV:N/AC:L/Au:N/C:P/I:P/A:P
GitHub 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
packagist smarty/smarty
<3.1.39
3.1.39

Classification

Weakness
  • CWE-94 Improper Control of Generation of Code

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.