CVE-2021-26120
9.8critical
PHP Code Injection by malicious function name in smarty
- Severity
- 9.8critical CVSS:3.1 by NVD
- Exploit likelihood
- 82.3% (higher than 99% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-3rpf-5rqv-689q
Description
Smarty before 3.1.39 allows code injection via an unexpected function name after a {function name= substring.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| smarty/smarty (Packagist) | before 3.1.39 | GitHub Advisory Database |
| smarty smarty | before 3.1.39 | NVD |
| debian debian_linux | 9.0, 10.0, 11.0 | NVD |
All scores
| GitHub | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 7.5high CVSS:2.0 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Classification
What each source says
CVE List
Smarty before 3.1.39 allows code injection via an unexpected function name after a {function name= substring.
GitHub Advisory Database
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.
NVD (es)
Smarty versiones anteriores a 3.1.39, permite una inyección de código por medio de un nombre de función no previsto después de una subcadena {function name=
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-26120 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-3rpf-5rqv-689q changed 2024-02-16 | CC-BY-4.0 |
| NVD | CVE-2021-26120 changed 2026-06-17 | Public domain |