Cyber Resilience

CVE-2024-56201

Palletsprojects Jinja 3.0.0 – 3.1.5

Published
23 December 2024
Modified
22 September 2025
Patch / advisory
CVSS Score v4 5.4
Click a component to see what it means
Raw vectorCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS Score 0.0031 23th percentile
Risk Priority 35 floored blend · peak EPSS

Summary

CVE-2024-56201 is a medium-severity Improper Neutralization of Escape, Meta, or Control Sequences (CWE-150) vulnerability in Palletsprojects Jinja. Its CVSS base score is 5.4 (Medium).

Operationally, exploitation aligns with the MITRE ATT&CK technique Content Injection (T1659); ranked at the 23th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to SI-10 (Information Input Validation) — see the control section below for these in your framework.

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1659 Content Injection Initial Access
Adversaries may gain access and continuously communicate with victims by injecting malicious content into systems through online network traffic.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2024-22195Same product: Palletsprojects Jinja
CVE-2024-56326Same product: Palletsprojects Jinja
CVE-2026-21439Shared CWE-150
CVE-2026-40505Shared CWE-150
CVE-2025-65082Shared CWE-150
CVE-2023-3265Shared CWE-150
CVE-2023-39342Shared CWE-150
CVE-2025-64494Shared CWE-150
CVE-2024-47252Shared CWE-150
CVE-2026-41526Shared CWE-150

Affected Assets

palletsprojects
jinja
3.0.0 — 3.1.5

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V1.2.10
  • V1.3.12

Mitigating Controls (NIST 800-53 r5) AI

SI-10 requires validation/sanitization of inputs that directly stops escape/meta/control sequences from reaching downstream components.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly require input neutralization and escaping to prevent this class of flaw.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Security testing can detect the weakness but does not itself implement neutralization.

prevents

Secure development lifecycle mandates input validation and output encoding that directly neutralizes escape/meta sequences.

prevents

Application security requirements explicitly call for controls against injection and malformed input sequences.

prevents

Secure architecture principles reduce attack surface but do not prescribe specific neutralization techniques.

prevents

Secure coding standards require proper escaping and neutralization of control characters before downstream processing.

References