Vulnerabilities / CVE-2021-26120

critical

CVE-2021-26120

Smarty before 3.1.39 allows code injection via an unexpected function ...

Published Modified CWE 94
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GHSA9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Trivy's own label is CRITICAL. Rated critical by NVD, GHSA. Rated lower by Ubuntu (medium).

Description

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

Affected packages and fixed versions

SourcePackageFixed in
composer::GitHub Security Advisory Composersmarty/smarty3.1.39
composer::PHP Security Advisories Databasesmarty/smartyno fix listed
debian 10smarty33.1.33+20180830.1.3a78a21f+selfpack1-1+deb10u1
debian 11smarty33.1.39-1
debian 12smarty33.1.39-1
debian 13smarty33.1.39-1
debian 14smarty33.1.39-1
debian 9smarty33.1.31+20161214.1.c7d42e4+selfpack1-2+deb9u2
echosmarty33.1.39-1
ubuntu 16.04-ESMsmarty33.1.21-1ubuntu1+esm1
ubuntu 18.04smarty33.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1
ubuntu 18.04-ESMsmarty33.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1
Show all 13 entries from 13 sources
SourcePackageFixed in
composer::GitHub Security Advisory Composersmarty/smarty3.1.39
composer::PHP Security Advisories Databasesmarty/smartyno fix listed
debian 10smarty33.1.33+20180830.1.3a78a21f+selfpack1-1+deb10u1
debian 11smarty33.1.39-1
debian 12smarty33.1.39-1
debian 13smarty33.1.39-1
debian 14smarty33.1.39-1
debian 9smarty33.1.31+20161214.1.c7d42e4+selfpack1-2+deb9u2
echosmarty33.1.39-1
ubuntu 16.04-ESMsmarty33.1.21-1ubuntu1+esm1
ubuntu 18.04smarty33.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1
ubuntu 18.04-ESMsmarty33.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1
ubuntu 20.04-ESMsmarty33.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1~esm1

References

All 16 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.