CVE-2024-56326
Python vulnerability analysis and mitigation

Overview

Jinja is an extensible templating engine that experienced a security vulnerability (CVE-2024-56326) prior to version 3.1.5. The vulnerability was discovered in December 2024 and involves an oversight in how the Jinja sandboxed environment detects calls to str.format, potentially allowing an attacker that controls the content of a template to execute arbitrary Python code (GitHub Advisory).

Technical details

The vulnerability stems from an oversight in the sandbox implementation where indirect calls to str.format were not properly handled. While Jinja's sandbox catches direct calls to str.format and ensures they don't escape the sandbox, attackers could store a reference to a malicious string's format method and then pass that to a filter that calls it. This bypass method works even though no such filters are built into Jinja, as they could be present through custom filters in an application (GitHub Advisory). The vulnerability has been assigned a CVSS v4.0 base score of 5.4 (Moderate) with the vector string CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N (NVD).

Impact

The vulnerability allows attackers who control template content to potentially execute arbitrary Python code. This particularly impacts applications that execute untrusted templates. The impact metrics indicate High severity for Confidentiality, Integrity, and Availability of the vulnerable system, though there is no impact on subsequent systems (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been fixed in Jinja version 3.1.5. After the fix, indirect calls to str.format are properly handled by the sandbox. Users are advised to upgrade to version 3.1.5 or later to address this security issue (GitHub Release).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-67511CRITICAL9.6
  • PythonPython
  • cai-framework
NoNoDec 11, 2025
CVE-2025-13780CRITICAL9.1
  • PythonPython
  • pgadmin4
NoYesDec 11, 2025
CVE-2025-67644HIGH7.3
  • PythonPython
  • langgraph-checkpoint-sqlite
NoYesDec 11, 2025
CVE-2025-67720MEDIUM6.5
  • PythonPython
  • pyrofork
NoYesDec 11, 2025
CVE-2025-67485MEDIUM5.3
  • PythonPython
  • mad-proxy
NoNoDec 10, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management