CVE-2024-56201

Jinja has a sandbox breakout through malicious filenames

State
Published
Severity
5.4 Medium
Published
Dec 23, 2024
Updated
Feb 18, 2025
Reserved
Dec 18, 2024

Read the record on cve.org

Description

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 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.

Scores

CVSSScoreVectorSource
4.05.4 MediumCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NGitHub_M

Weaknesses

  • CWE-150 Improper Neutralization of Escape, Meta, or Control Sequences

Affected Products

ProductVersions
jinjapallets
  • >= 3.0.0, < 3.1.5Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.