CVE-2024-56201
ADVISORY - githubSummary
A bug in the Jinja compiler allows an attacker that controls both the content and filename of a template to execute arbitrary Python code, regardless of if Jinja's sandbox is used.
To exploit the vulnerability, an attacker needs to control both the filename and the contents of a template. Whether that is the case depends on the type of application using Jinja. This vulnerability impacts users of applications which execute untrusted templates where the template author can also choose the template filename.
Common Weakness Enumeration (CWE)
Improper Neutralization of Escape, Meta, or Control Sequences
Improper Neutralization of Escape, Meta, or Control Sequences
Improper Neutralization of Escape, Meta, or Control Sequences
GitHub
2.8
CVSS SCORE
5.4mediumPackage | Type | OS Name | OS Version | Affected Ranges | Fix Versions |
---|---|---|---|---|---|
jinja2 | pypi | - | - | >=3.0.0,<=3.1.4 | 3.1.5 |
CVSS:4 Severity and metrics
The CVSS metrics represent different qualitative aspects of a vulnerability that impact the overall score, as defined by the CVSS Specification.
The vulnerable component is not bound to the network stack and the attacker's path is via read/write/execute capabilities. Either: The attacker exploits the vulnerability by accessing the target system locally (e.g., keyboard, console), or remotely (e.g., SSH); or the attacker relies on User Interaction by another person to perform actions required to exploit the vulnerability (e.g., using social engineering techniques to trick a legitimate user into opening a malicious document).
Specialized access conditions or extenuating circumstances do not exist. An attacker can expect repeatable success when attacking the vulnerable component.
The successful attack depends on the presence of specific deployment and execution conditions of the vulnerable system that enable the attack. These include: A race condition must be won to successfully exploit the vulnerability. The successfulness of the attack is conditioned on execution conditions that are not under full control of the attacker. The attack may need to be launched multiple times against a single target before being successful. Network injection. The attacker must inject themselves into the logical network path between the target and the resource requested by the victim (e.g. vulnerabilities requiring an on-path attacker).
The attacker requires privileges that provide basic capabilities that are typically limited to settings and resources owned by a single low-privileged user. Alternatively, an attacker with Low privileges has the ability to access only non-sensitive resources.
Successful exploitation of this vulnerability requires limited interaction by the targeted user with the vulnerable system and the attacker's payload. These interactions would be considered involuntary and do not require that the user actively subvert protections built into the vulnerable system. Examples include: utilizing a website that has been modified to display malicious content when the page is rendered (most stored XSS or CSRF) running an application that calls a malicious binary that has been planted on the system using an application which generates traffic over an untrusted or compromised network (vulnerabilities requiring an on-path attacker).
There is a total loss of confidentiality, resulting in all information within the Vulnerable System being divulged to the attacker. Alternatively, access to only some restricted information is obtained, but the disclosed information presents a direct, serious impact. For example, an attacker steals the administrator's password, or private encryption keys of a web server.
There is no loss of confidentiality within the Subsequent System or all confidentiality impact is constrained to the Vulnerable System.
There is a total loss of integrity, or a complete loss of protection. For example, the attacker is able to modify any/all files protected by the Vulnerable System. Alternatively, only some files can be modified, but malicious modification would present a direct, serious consequence to the Vulnerable System.
There is no loss of integrity within the Subsequent System or all integrity impact is constrained to the Vulnerable System.
There is a total loss of availability, resulting in the attacker being able to fully deny access to resources in the Vulnerable System; this loss is either sustained (while the attacker continues to deliver the attack) or persistent (the condition persists even after the attack has completed). Alternatively, the attacker has the ability to deny some availability, but the loss of availability presents a direct, serious consequence to the Vulnerable System (e.g., the attacker cannot disrupt existing connections, but can prevent new connections; the attacker can repeatedly exploit a vulnerability that, in each instance of a successful attack, leaks a only small amount of memory, but after repeated exploitation causes a service to become completely unavailable).
There is no impact to availability within the Subsequent System or all availability impact is constrained to the Vulnerable System.
NIST
2
CVSS SCORE
5.4mediumAlpine
-
Debian
-
CVSS SCORE
N/AlowUbuntu
2.0
CVSS SCORE
8.8mediumAlma
-
CVSS SCORE
N/AhighAmazon
-
CVSS SCORE
N/AhighRed Hat
1.3
CVSS SCORE
7.3highRocky
-
CVSS SCORE
N/AhighOracle
-
CVSS SCORE
N/AhighChainguard
CGA-2589-9xpr-fmp7
-
Chainguard
CGA-372m-j842-xpmm
-
Chainguard
CGA-3v7c-pxv8-qvvc
-
Chainguard
CGA-5c4c-gf45-j7fv
-
Chainguard
CGA-5jxw-7gv5-jv29
-
Chainguard
CGA-69p9-9g85-vmgm
-
Chainguard
CGA-6pvq-6ww4-f29g
-
Chainguard
CGA-6q8c-hmcq-q8fg
-
Chainguard
CGA-77x5-rqgg-8r38
-
Chainguard
CGA-7wv8-825f-mrv5
-
Chainguard
CGA-7xwf-hp2w-j842
-
Chainguard
CGA-84mx-mwq4-vfr9
-
Chainguard
CGA-9fmg-5576-4h3w
-
Chainguard
CGA-9x7g-9rfp-4xhm
-
Chainguard
CGA-f7cf-h8jg-fwmv
-
Chainguard
CGA-gvvw-7w3r-7m54
-
Chainguard
CGA-h79h-32w2-7vmp
-
Chainguard
CGA-j5jg-x8f5-hxcv
-
Chainguard
CGA-j6mc-2mqh-8hp2
-
Chainguard
CGA-jjj9-fv4h-c9cv
-
Chainguard
CGA-jr6g-xxjr-rgc8
-
Chainguard
CGA-mvqg-6j62-4pjm
-
Chainguard
CGA-q48p-2qpp-m58h
-
Chainguard
CGA-vj5f-6mc5-q329
-
Chainguard
CGA-vm55-cfmf-jr9r
-
Chainguard
CGA-w9xc-2j9j-8rrv
-
Chainguard
CGA-whf8-42p9-686q
-
Chainguard
CGA-xqq4-gxgx-3463
-
Photon
CVE-2024-56201
-
CVSS SCORE
8.8highminimos
MINI-vxwv-h4m4-mr94
-