CVE-2024-56326High· 7.8▾ TwilightJinja has a sandbox breakout through indirect reference to format method
▾ Twilight zone — High severity, or a signal on a lesser flaw
impact 42.9 · likelihood 0.1 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Exploit-prediction probability, daily snapshots since Jul 8.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via OSV
0.5%
0.5% → 0.5%
Last analysed / modified upstream
7.8 → 6.3
high → medium
6.3 → 7.8
medium → high
7.8 → 6.3
high → medium
6.3 → 7.8
medium → high
7.8 → 6.3
high → medium
6.3 → 7.8
medium → high
An oversight in how the Jinja sandboxed environment detects calls to str.format allows an attacker that controls the content of a template to execute arbitrary Python code.
To exploit the vulnerability, an attacker needs to control the content 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.
Jinja's sandbox does catch calls to str.format and ensures they don't escape the sandbox. However, it's possible to store a reference to a malicious string's format method, then pass that to a filter that calls it. No such filters are built-in to Jinja, but could be present through custom filters in an application. After the fix, such indirect calls are also handled by the sandbox.
jinja2 < 3.1.5Upgrade to a patched release:
jinja2 3.1.5Field changes observed since this record was first indexed.
Connected by shared product, vendor, weakness, or advisory.
CVE-2024-56201High· 8.8Jinja has a sandbox breakout through malicious filenames
CVE-2025-27516Medium· 7.3Jinja2 vulnerable to sandbox breakout through attr filter selecting format method
CVE-2024-22195Medium· 5.4Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter
CVE-2024-34064Medium· 5.4Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter
CVE-2026-44513High· 8.8Diffusers is the a library for pretrained diffusion models
CVE-2025-71408High· 7.0nltk: NLTK: Arbitrary Code Execution via Eval Injection in Collocations Module (CVE-2025-71408)