Your RSA-2048 keys break in 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
Dec 23, 2024
Updated
Aug 12, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Sep 22, 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

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

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
🐍PyPIjinja23.0.0&&< 3.1.53.1.5pip install --upgrade 'jinja2==3.1.5'

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.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2024-56201 can be triaged on real exposure rather than presence alone.

Tailored to CVE-2024-56201. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

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.

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?

O3 Security finds CVE-2024-56201 across PyPI dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

CVE-2024-56201: jinja2 | O3 Security