9.8
CRITICAL CVSS 3.1
CVE-2021-26120
Smarty PHP Remote Code Injection Vulnerability
Description

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

INFO

Published Date :

Feb. 22, 2021, 2:15 a.m.

Last Modified :

Nov. 21, 2024, 5:55 a.m.

Remotely Exploit :

Yes !
Affected Products

The following products are affected by CVE-2021-26120 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Debian debian_linux
1 Smarty smarty
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 2.0 HIGH [email protected]
CVSS 3.1 CRITICAL [email protected]
Solution
The Smarty template engine is vulnerable to remote code injection; updating to a patched version is recommended.
  • Update the Smarty package.
  • If available, upgrade to version 3.1.39 or later.
Public PoC/Exploit Available at Github

CVE-2021-26120 has a 5 public PoC/Exploit available at Github. Go to the Public Exploits tab to see the list.

References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2021-26120.

URL Resource
https://github.com/smarty-php/smarty/blob/master/CHANGELOG.md Release Notes Third Party Advisory
https://lists.debian.org/debian-lts-announce/2021/04/msg00004.html Mailing List Third Party Advisory
https://lists.debian.org/debian-lts-announce/2021/04/msg00014.html Mailing List Third Party Advisory
https://security.gentoo.org/glsa/202105-06 Patch Third Party Advisory
https://www.debian.org/security/2022/dsa-5151 Third Party Advisory
https://github.com/smarty-php/smarty/blob/master/CHANGELOG.md Release Notes Third Party Advisory
https://lists.debian.org/debian-lts-announce/2021/04/msg00004.html Mailing List Third Party Advisory
https://lists.debian.org/debian-lts-announce/2021/04/msg00014.html Mailing List Third Party Advisory
https://security.gentoo.org/glsa/202105-06 Patch Third Party Advisory
https://www.debian.org/security/2022/dsa-5151 Third Party Advisory
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2021-26120 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2021-26120 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

This thesis project focuses on the creation of an autonomous agent that is capable of understanding CVE description and create from its interpretation a vulnerable Docker container, which can then be used to gather attack patterns data. The Docker creation process is benchmarked in order to understand how well the agent is performing its tasks.

Dockerfile HTML Python Shell Groovy PHP Java SaltStack JavaScript CSS

Updated: 4 days, 19 hours ago
0 stars 0 fork 0 watcher
Born at : April 1, 2025, 1:35 p.m. This repo has been linked 115 different CVEs too.

A curated collection of Proof of Concept (PoC) tools, scripts, and techniques designed for red team operations, penetration testing, and cybersecurity research. This repository focuses on providing practical resources for exploring vulnerabilities

attack cybersecurity exp hw penetration-testing poc red-team security-tools vulnerability-poc

Updated: 7 months ago
5 stars 3 fork 3 watcher
Born at : Nov. 17, 2024, 11:53 a.m. This repo has been linked 414 different CVEs too.

这是一个每天同步Vulnerability-Wiki中docs-base中内容的项目

HTML

Updated: 4 days, 3 hours ago
4 stars 1 fork 1 watcher
Born at : Sept. 20, 2024, 3:27 a.m. This repo has been linked 252 different CVEs too.

一个Vulhub漏洞复现知识库

vulnerability exploit

Updated: 11 months, 2 weeks ago
448 stars 87 fork 87 watcher
Born at : March 3, 2022, 8:38 a.m. This repo has been linked 171 different CVEs too.

一个漏洞 PoC 知识库。A knowledge base for vulnerability PoCs(Proof of Concept), with 1k+ vulnerabilities.

poc

Dockerfile

Updated: 1 day, 4 hours ago
4483 stars 898 fork 898 watcher
Born at : Feb. 20, 2022, 6:43 a.m. This repo has been linked 456 different CVEs too.

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2021-26120 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2021-26120 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference https://github.com/smarty-php/smarty/blob/master/CHANGELOG.md
    Added Reference https://lists.debian.org/debian-lts-announce/2021/04/msg00004.html
    Added Reference https://lists.debian.org/debian-lts-announce/2021/04/msg00014.html
    Added Reference https://security.gentoo.org/glsa/202105-06
    Added Reference https://www.debian.org/security/2022/dsa-5151
  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • Modified Analysis by [email protected]

    Oct. 14, 2022

    Action Type Old Value New Value
    Changed Reference Type https://www.debian.org/security/2022/dsa-5151 No Types Assigned https://www.debian.org/security/2022/dsa-5151 Third Party Advisory
    Changed CPE Configuration OR *cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* OR *cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* *cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* *cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*
  • CVE Modified by [email protected]

    Jun. 02, 2022

    Action Type Old Value New Value
    Added Reference https://www.debian.org/security/2022/dsa-5151 [No Types Assigned]
  • Modified Analysis by [email protected]

    Apr. 29, 2022

    Action Type Old Value New Value
    Changed Reference Type https://security.gentoo.org/glsa/202105-06 No Types Assigned https://security.gentoo.org/glsa/202105-06 Patch, Third Party Advisory
  • CVE Modified by [email protected]

    May. 26, 2021

    Action Type Old Value New Value
    Added Reference https://security.gentoo.org/glsa/202105-06 [No Types Assigned]
  • Modified Analysis by [email protected]

    Apr. 21, 2021

    Action Type Old Value New Value
    Changed Reference Type https://lists.debian.org/debian-lts-announce/2021/04/msg00004.html No Types Assigned https://lists.debian.org/debian-lts-announce/2021/04/msg00004.html Mailing List, Third Party Advisory
    Changed Reference Type https://lists.debian.org/debian-lts-announce/2021/04/msg00014.html No Types Assigned https://lists.debian.org/debian-lts-announce/2021/04/msg00014.html Mailing List, Third Party Advisory
    Added CPE Configuration OR *cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
  • CVE Modified by [email protected]

    Apr. 16, 2021

    Action Type Old Value New Value
    Added Reference https://lists.debian.org/debian-lts-announce/2021/04/msg00014.html [No Types Assigned]
  • CVE Modified by [email protected]

    Apr. 05, 2021

    Action Type Old Value New Value
    Added Reference https://lists.debian.org/debian-lts-announce/2021/04/msg00004.html [No Types Assigned]
  • Initial Analysis by [email protected]

    Feb. 26, 2021

    Action Type Old Value New Value
    Added CVSS V2 NIST (AV:N/AC:L/Au:N/C:P/I:P/A:P)
    Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    Changed Reference Type https://github.com/smarty-php/smarty/blob/master/CHANGELOG.md No Types Assigned https://github.com/smarty-php/smarty/blob/master/CHANGELOG.md Release Notes, Third Party Advisory
    Added CWE NIST CWE-94
    Added CPE Configuration OR *cpe:2.3:a:smarty:smarty:*:*:*:*:*:*:*:* versions up to (excluding) 3.1.39
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
Vulnerability Scoring Details
Base CVSS Score: 9.8
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality Impact
Integrity Impact
Availability Impact
Base CVSS Score: 7.5
Access Vector
Access Complexity
Authentication
Confidentiality Impact
Integrity Impact
Availability Impact
Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

78.84 }} 2.18%

score

0.98988

percentile