High severity · published Dec 23, 2024
CVE-2024-56201
Jinja has a sandbox breakout through malicious filenames
8.8
CVSS
0.3%
EPSS
No
On KEV
Description
Jinja is an extensible templating engine. In versions on the 3.x branch prior to 3.1.5, 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. This vulnerability is fixed in 3.1.5.
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Attack vector
Local
Complexity
Low
Privileges
Low
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Changed
Exploitation
Is it being used?
Exploit prediction (EPSS)0.3% · higher than 23% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
JI
jinja · pallets
>= 3.0.0, < 3.1.5 · source: vendor, NVD
Affected product
JI
jinja
pallets
More from jinja
8.8
CVE-2025-27516
Jinja sandbox breakout through attr filter selecting format method
7.8
CVE-2024-56326
Jinja has a sandbox breakout through indirect reference to format method
6.1
CVE-2024-22195
Jinja vulnerable to Cross-Site Scripting (XSS)
5.4
CVE-2024-34064
Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter