CVE-2024-56326
CVE-2024-56326 is a high-severity vulnerability in Palletsprojects Jinja with a CVSS 3.x base score of 7.8. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-693.
Key facts
- Severity: High (CVSS 3.x base score 7.8)
- CVSS v4: 5.4
- EPSS exploit prediction: 0% (39th percentile)
- Actively exploited: Not listed in CISA KEV
- EU (EUVD) id: EUVD-2024-3607
- Weakness: CWE-693
- Affected product: Palletsprojects Jinja
- Published:
- Last modified:
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.
Frequently asked questions
- What is CVE-2024-56326?
- 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.
- How severe is CVE-2024-56326?
- CVE-2024-56326 has a CVSS 3.x base score of 7.8, rated high severity. It is exploitable over local access with low attack complexity, requires low privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2024-56326 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 0% (39th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2024-56326?
- CVE-2024-56326 affects Palletsprojects Jinja. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2024-56326?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its high severity, prioritise patching exposed systems.
- Does CVE-2024-56326 have an EU (EUVD) identifier?
- Yes. CVE-2024-56326 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2024-3607.
- When was CVE-2024-56326 published?
- CVE-2024-56326 was published on 2024-12-23 and last updated on 2026-06-17.
References
- https://github.com/pallets/jinja/commit/48b0687e05a5466a91cd5812d604fa37ad0943b4
- https://github.com/pallets/jinja/releases/tag/3.1.5
- https://github.com/pallets/jinja/security/advisories/GHSA-q2x7-8rv6-6q7h
- https://lists.debian.org/debian-lts-announce/2025/04/msg00022.html
Affected products (1)
- cpe:2.3:a:palletsprojects:jinja:*:*:*:*:*:*:*:*
More vulnerabilities in Palletsprojects Jinja
- CVE-2025-27516 — High (CVSS 8.8): Jinja is an extensible templating engine. Prior to 3.1.6, an oversight in how the Jinja sandboxed environment interacts…
- CVE-2024-56201 — High (CVSS 8.8): Jinja is an extensible templating engine. In versions on the 3.x branch prior to 3.1.5, a bug in the Jinja compiler…
- CVE-2016-10745 — High (CVSS 8.6): In Pallets Jinja before 2.8.1, str.format allows a sandbox escape.
- CVE-2019-10906 — High (CVSS 8.6): In Pallets Jinja before 2.10.1, str.format_map allows a sandbox escape.
- CVE-2024-34064 — Medium (CVSS 5.4): Jinja is an extensible templating engine. The `xmlattr` filter in affected versions of Jinja accepts keys containing…
- CVE-2024-22195 — Medium (CVSS 5.4): Jinja is an extensible templating engine. Special placeholders in the template allow writing code similar to Python…
All CVEs affecting Palletsprojects Jinja →
Other CWE-693 (Protection Mechanism Failure) vulnerabilities
- CVE-2026-47140 — Critical (CVSS 10.0): vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, NodeVM blocks several dangerous Node.js builtins…
- CVE-2026-34208 — Critical (CVSS 10.0): SandboxJS is a JavaScript sandboxing library. Prior to 0.8.36, SandboxJS blocks direct assignment to global objects…
- CVE-2026-34938 — Critical (CVSS 10.0): PraisonAI is a multi-agent teams system. Prior to version 1.5.90, execute_code() in praisonai-agents runs…
- CVE-2026-2761 — Critical (CVSS 10.0): Sandbox escape in the Graphics: WebRender component. This vulnerability was fixed in Firefox 148, Firefox ESR 115.33,…
- CVE-2022-32845 — Critical (CVSS 10.0): This issue was addressed with improved checks. This issue is fixed in watchOS 8.7, iOS 15.6 and iPadOS 15.6, macOS…
- CVE-2026-45102 — Critical (CVSS 9.9): OneUptime is an open-source monitoring and observability platform. Prior to 10.0.98, OneUptime uses the Node.js' vm…
Browse all CWE-693 (Protection Mechanism Failure) vulnerabilities →