Vulnerability in Pallets Jinja
CVE-2024-56201
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.
Published · last modified .
CVSS v3 metric
CVSS v3 base score 8.8 (High). Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H.
EPSS exploit prediction
EPSS 0.003, 23.8th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
- Pallets Jinja — versions >= 3.0.0, < 3.1.5
- Palletsprojects Jinja
Weakness classification (CWE)
Public exploits and proof-of-concept code
Also mentioned in 1 other repository (PBorocz/raindrop-io-py). These reference the CVE in a list, notes or a scanner and are not exploit code for it.
References
- https://github.com/pallets/jinja/security/advisories/GHSA-gmj6-6f8f-6699 (Vendor Advisory)
- https://github.com/pallets/jinja/issues/1792 (Issue Tracking)
- https://github.com/pallets/jinja/commit/767b23617628419ae3709ccfb02f9602ae9fe51f (Patch)
- https://github.com/pallets/jinja/releases/tag/3.1.5 (Release Notes)