NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐍 PyPI
Not in CISA KEV

CVE-2024-56201 — jinja2

Fix: pallets/jinja@767b236

CVE-2024-56201 is a CWE-150 vulnerability in jinja2. A fix is available for jinja2 — see the affected versions and patch details below.

Jinja has a sandbox breakout through malicious filenames

Also known asGHSA-gmj6-6f8f-6699PYSEC-2026-1472
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Nov 6, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • A successful exploit gives an attacker total control of the affected component, not partial access.
  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2024-56201.

EPSS Exploitation Probability

via FIRST.org ↗
0.3%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs24th percentile — riskier than 24% of all scored CVEsHighest risk
0.00%0.36%0.72%1.07%0.5%0.3%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

1 pkg affected
🐍jinja2

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

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.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIjinja2≥ 3.0.0&&< 3.1.53.1.5pip install --upgrade 'jinja2==3.1.5'

Affected Products

1 product · 1 configurations
Application
jinjapalletsprojects
≥ 3.0.0 && < 3.1.5
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for jinja2, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update jinja2 to 3.1.5 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-56201 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatImportant

This vulnerability has rated as a IMPORTANT flaw because an attacker controlling both the template content and filename to execute arbitrary Python code, bypassing the sandbox.

Workaround published by Red Hat
To mitigate this vulnerabilty restrict user-controlled template filenames, ensuring they follow a predefined templates.
Source: Red Hat security advisory for CVE-2024-56201 (CC BY 4.0)
ProductFixed inAdvisory
Ansible Automation Platform Execution Environmentsansible-automation-platform/ee-minimal-rhel8:2.12.10-57RHSA-2025:0753
Ansible Automation Platform Execution Environmentsansible-automation-platform/ee-minimal-rhel8:2.12.10-59RHSA-2025:1101
Discovery 1 for RHEL 9discovery/discovery-server-rhel9:1.12.0-1RHSA-2025:1249
Ironic content for Red Hat OpenShift Container Platform 4.12python-jinja2-0:3.0.1-6.el9.2RHSA-2025:0834
Ironic content for Red Hat OpenShift Container Platform 4.13python-jinja2-0:3.0.1-6.el9.2RHSA-2025:1118
Red Hat Ansible Automation Platform 2.4 for RHEL 8automation-controller-0:4.5.17-1.el8apRHSA-2025:0721
Red Hat Ansible Automation Platform 2.4 for RHEL 8ansible-automation-platform-24/lightspeed-rhel8-operator:2.4-33RHSA-2025:0722
Red Hat Ansible Automation Platform 2.5 for RHEL 8ansible-automation-platform-25/lightspeed-rhel8:2.5.250107-1RHSA-2025:0341

Frequently Asked Questions

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. T
O3 Security · Impact-Aware SCA

Is CVE-2024-56201 in your dependencies?

Find it across PyPI, including transitive dependencies.

CVE-2024-56201: jinja2 — Fixed in 3.1.5