Vulnerabilities

CVE-2024-56201

High 8.8 CVSS 3.1

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.

Description as published by the source, in English.

Key facts

Published
2024-12-23
Last modified
2026-06-17
Assigned by
security-advisories@github.com
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Scored by
nvd@nist.gov (NVD Primary)
Probability of exploitation
0.3 % higher than 23 % of all known vulnerabilities
EPSS, next 30 days, model v2026.06.15
Fix available
Yes, see references

Affected products

Vendor Product Versions Status
jinja2 (PyPI) ≥ 3.0.0, < 3.1.5 Affected
Palletsprojects Jinja ≥ 3.0.0, < 3.1.5 Affected

Weakness type

References

Does this affect you?

A vulnerability matters only if you run the product, in an affected version, somewhere an attacker can reach.

Check your asset list Browse all vulnerabilities