Critical
Security advisory
Smarty before 3.1.39 allows code injection via an unexpected function name after a {function name= substring.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-26120
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 11:41 UTC · Revision 1
Source evidence
Smarty before 3.1.39 allows code injection via an unexpected function name after a {function name= substring.
osv:CVE-2021-26120
Complete source record
{
"id": "2b5edcc8dbfe0bc95100bb78eb2ca3d95b4314f42e9085c6ec83eb57fc22e450",
"url": "https://osv.dev/vulnerability/CVE-2021-26120",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-26120",
"summary": "Smarty before 3.1.39 allows code injection via an unexpected function name after a {function name= substring.",
"evidence": "osv:CVE-2021-26120",
"products": [],
"severity": "critical",
"structured": {
"id": "CVE-2021-26120",
"aliases": [
"CVE-2021-26120",
"GHSA-3rpf-5rqv-689q"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/smarty-php/smarty",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "e27da524f7bcd7361e3ea5cdfa99c4378a7b5419"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:smarty:smarty:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "3.1.39"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"v3.1.38",
"v3.1.37.1",
"v3.1.37",
"v3.1.36",
"v3.1.35",
"v3.1.34",
"v3.1.33",
"v3.1.32",
"v3.1.31",
"v3.1.30",
"v3.1.29",
"v3.1.28",
"v2.6.28",
"v3.1.27",
"v3.1.26",
"v3.1.25",
"v3.1.24",
"v3.1.23",
"v3.1.21",
"v3.1.20",
"v3.1.19",
"v3.1.18",
"v3.1.17",
"v3.1.16",
"v3.1.15",
"v3.1.14",
"v3.1.13",
"v3.1.12",
"v3.1.11",
"v2.6.27",
"v2.6.26",
"v2.6.25",
"v2.6.24"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-26120.json"
}
}
],
"modified": "2026-10-20T10:54:34.274355723Z",
"provider": "osv",
"references": [
"https://github.com/smarty-php/smarty/blob/master/CHANGELOG.md",
"https://lists.debian.org/debian-lts-announce/2021/04/msg00004.html",
"https://lists.debian.org/debian-lts-announce/2021/04/msg00014.html",
"https://www.debian.org/security/2022/dsa-5151",
"https://security.gentoo.org/glsa/202105-06"
],
"provider_metadata": {
"unresolved_ranges": [
{
"cpes": [
"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*",
"cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*",
"cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*"
],
"vendor_product": "debian:debian_linux",
"extracted_events": [
{
"range": [
{
"introduced": "9.0"
},
{
"last_affected": "9.0"
},
{
"introduced": "10.0"
},
{
"last_affected": "10.0"
},
{
"introduced": "11.0"
},
{
"last_affected": "11.0"
}
],
"source": "CPE_STRING"
}
]
}
]
}
},
"related_cves": [
{
"value": "CVE-2021-26120",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 385615,
"published_at": "2021-02-22T02:15:14.323+00:00"
}