BreachSpiderVerified, not vibes

CVE-2024-56326 in Palletsprojects Jinja

High 7.8

Jinja is an extensible templating engine. Prior to 3.1.5, 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. ...

Affects 1 product from 1 vendor. Facts below cite their sources.

CVSS 3.17.8
CVSS v45.4
EPSS0.6%
EPSS percentile43th
FixUnknown

Requires local access, low complexity, low privileges required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.

Affected products and versions

VendorProductAffected versions
Palletsprojects Jinja < 3.1.5

A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.

Fix and vendor advisory

No official vendor advisory link on record. See the CVE record.

Vendor PSIRT: [email protected]

Exploitation

CISA known-exploitedNot in the CISA KEV catalog
Public exploitNot confirmed

Official description

Jinja is an extensible templating engine. Prior to 3.1.5, 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. This vulnerability is fixed in 3.1.5.

Source: NIST NVD / MITRE CVE.

Record details

CVE IDCVE-2024-56326
BreachSpider IDBS-2024-GLOBAL-222583-H
CVSS vectorCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Published2024-12-23
Last modified2026-06-17
Weakness (CWE)
SourceNVD

Weakness definitions

CWE-693: CWE-693

CWE-1336: CWE-1336

Related attack patterns (CAPEC)

CAPEC-51 Poison Web Service Registry via CWE-693

CAPEC-57 Utilizing REST's Trust in the System Resource to Obtain Sensitive Data via CWE-693

CAPEC-59 Session Credential Falsification through Prediction via CWE-693

CAPEC-65 Sniff Application Code via CWE-693

CAPEC-107 Cross Site Tracing via CWE-693

Show all 17

CAPEC-127 Directory Indexing via CWE-693

CAPEC-237 Escaping a Sandbox by Calling Code in Another Language via CWE-693

CAPEC-477 Signature Spoofing by Mixing Signed and Unsigned Content via CWE-693

CAPEC-1 Accessing Functionality Not Properly Constrained by ACLs via CWE-693

CAPEC-17 Using Malicious Files via CWE-693

CAPEC-20 Encryption Brute Forcing via CWE-693

CAPEC-36 Using Unpublished Interfaces or Functionality via CWE-693

CAPEC-87 Forceful Browsing via CWE-693

CAPEC-480 Escaping Virtualization via CWE-693

CAPEC-668 Key Negotiation of Bluetooth Attack (KNOB) via CWE-693

CAPEC-22 Exploiting Trust in Client via CWE-693

CAPEC-74 Manipulating State via CWE-693

Mapping is CWE to CAPEC per MITRE CAPEC 3.9.

Analysis AI-written, not human-reviewed

CVE-2024-56326 affects Jinja templating engine versions prior to 3.1.5, allowing an attacker to execute arbitrary Python code if they control the template content.

An attacker can exploit this vulnerability by injecting malicious code into the template that utilizes the str.format method, bypassing the sandboxed environment's protections.

Questions

What is CVE-2024-56326?

CVE-2024-56326 affects Jinja templating engine versions prior to 3.1.5, allowing an attacker to execute arbitrary Python code if they control the template content.

What is the CVSS score for CVE-2024-56326?

CVE-2024-56326 has CVSS 7.8 (High). Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. EPSS: 0.6%.

Is CVE-2024-56326 actively exploited?

No confirmed active exploitation of CVE-2024-56326 as of 2026-09-25.

How do I remediate CVE-2024-56326?

Priority: HIGH. PSIRT: [email protected]

What systems are affected by CVE-2024-56326?

CVE-2024-56326 affects Palletsprojects Jinja.

For developers and AI agents

Run this check from your own code or agent

REST API

curl -s https://breachspider.com/api/v1/assets/correlate-cves \
 -H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"assets":[{"asset_id":"dev-1","vendor":"Palletsprojects","product":"Jinja","version":"1.0"}]}'

API reference

Python SDK

pip install breachspider

PyPI · GitHub

MCP for AI agents

# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp

Setup for Claude, ChatGPT, Cursor

Free trial: 14 days, 750 device checks, no card.

Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.