# CVE-2024-56201: Jinja has a sandbox breakout through malicious filenames

- Severity: Medium 5.4 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.31%, higher than 25% of CVEs (2026-12-02)
- Published: 2024-12-23T15:37:36.110Z
- Modified: 2026-09-10T03:50:56.152Z
- Also known as: GHSA-gmj6-6f8f-6699, PYSEC-2026-1472
- Weaknesses: CWE-150
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- pallets jinja: >= 3.0.0, < 3.1.5
- jinja2 (PyPI): from 3.0.0 before 3.1.5
- palletsprojects jinja: from 3.0.0 before 3.1.5

## Every score

- GitHub_M: CVSS:4.0 5.4 Medium `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`
- GitHub: CVSS:3.1 8.8 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:4.0 Medium `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: CVSS:3.1 8.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:4.0 `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`

## References

- <https://github.com/pallets/jinja/security/advisories/GHSA-gmj6-6f8f-6699> (vendor-advisory, web)
- <https://github.com/pallets/jinja/issues/1792> (issue-tracking, web)
- <https://github.com/pallets/jinja/commit/767b23617628419ae3709ccfb02f9602ae9fe51f> (fix, patch, web)
- <https://github.com/pallets/jinja/releases/tag/3.1.5> (release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-56201> (advisory)
- <https://github.com/pallets/jinja> (package)
- <https://pypi.org/project/jinja2> (package)
- <https://github.com/advisories/GHSA-gmj6-6f8f-6699> (advisory)

## Sources

- CVE List: [CVE-2024-56201](https://www.cve.org/CVERecord?id=CVE-2024-56201), CVE Terms of Use, modified 2025-02-18
- GitHub Advisory Database: [GHSA-gmj6-6f8f-6699](https://github.com/advisories/GHSA-gmj6-6f8f-6699), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2024-56201](https://nvd.nist.gov/vuln/detail/CVE-2024-56201), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-1472](https://osv.dev/vulnerability/PYSEC-2026-1472), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2024-56201 · Whole record: https://cve.day/CVE-2024-56201.json · Rebuilt by cve.day 2026-11-25T22:58:50.326Z
