GHSA-gmj6-6f8f-6699

Suggest an improvement
Source
https://github.com/advisories/GHSA-gmj6-6f8f-6699
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/12/GHSA-gmj6-6f8f-6699/GHSA-gmj6-6f8f-6699.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-gmj6-6f8f-6699
Aliases
Related
Published
2024-12-23T17:54:12Z
Modified
2025-01-08T16:44:05.703528Z
Severity
  • 8.8 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
  • 5.4 (Medium) CVSS_V4 - 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 CVSS Calculator
Summary
Jinja has a sandbox breakout through malicious filenames
Details

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.

Database specific
{
    "nvd_published_at": "2024-12-23T16:15:07Z",
    "cwe_ids": [
        "CWE-150"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2024-12-23T17:54:12Z"
}
References

Affected packages

PyPI / jinja2

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.0.0
Fixed
3.1.5

Affected versions

3.*

3.0.0
3.0.1
3.0.2
3.0.3
3.1.0
3.1.1
3.1.2
3.1.3
3.1.4

Database specific

{
    "last_known_affected_version_range": "<= 3.1.4"
}