CVE-2024-56326
Jinja has a sandbox breakout through indirect reference to format method
Jinja is an extensible templating engine. Prior to 3.1.5, An oversight in how the Jinja sandboxed environment detects calls to str.format allows an attacker that controls the content of a template to execute arbitrary Python code. To exploit the vulnerability, an attacker needs to control the content 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. Jinja's sandbox does catch calls to str.format and ensures they don't escape the sandbox. However, it's possible to store a reference to a malicious string's format method, then pass that to a filter that calls it. No such filters are built-in to Jinja, but could be present through custom filters in an application. After the fix, such indirect calls are also handled by the sandbox. This vulnerability is fixed in 3.1.5.
Exposure status: unknown. This page does not establish whether an installed system is affected or corrected.
Severity and exploitation evidence
EPSS: 0.522% · score date 2026-11-19. EPSS is an estimated probability over the next 30 days, not proof of exploitation.
CISA KEV: not included in the checked catalog; exploitation may still occur. Last checked: 2026-11-19T17:28:52.703Z. Public exploit availability is not used to set this status.
CVSS 4.0 · 5.4 · published by GitHub_MCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Assessment source · checked 2026-11-19T12:57:21.367Z
Verification by field
| Field | Status | Checked at (UTC) | Source |
|---|---|---|---|
| kev | verified | 2026-11-19T17:28:52.703Z | CISA KEV |
| cvss | verified | 2026-11-19T12:57:21.367Z | CVE Program |
| epss | verified | 2026-11-19T16:04:39.514Z | FIRST EPSS |
| patches | verified | 2026-11-19T12:52:20.708Z | OSV |
| affected | verified | 2026-11-19T12:57:21.367Z | CVE Program |
| lifecycle | verified | 2026-11-19T12:57:21.367Z | CVE Program |
Affected versions and configuration
pallets jinja; default status: unknown: < 3.1.5 [affected; scheme: unspecified]
Defaults, conditional configuration, package status and version schemes are retained below. A version range alone is not an exposure verdict.
CVE Program · cve-json · full conditions
{
"affected": [
{
"vendor": "pallets",
"product": "jinja",
"versions": [
{
"status": "affected",
"version": "< 3.1.5"
}
]
}
],
"additionalContainers": [
{
"title": "CISA ADP Vulnrichment",
"metrics": [
{
"cvssV3_1": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 7.8,
"attackVector": "LOCAL",
"baseSeverity": "HIGH",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"integrityImpact": "HIGH",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"availabilityImpact": "HIGH",
"privilegesRequired": "LOW",
"confidentialityImpact": "HIGH"
}
},
{
"other": {
"type": "ssvc",
"content": {
"id": "CVE-2024-56326",
"role": "CISA Coordinator",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "no"
},
{
"Technical Impact": "total"
}
],
"version": "2.0.3",
"timestamp": "2024-12-27T17:50:50.460995Z"
}
}
}
],
"providerMetadata": {
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP",
"dateUpdated": "2024-12-27T17:54:33.724Z"
}
},
{
"title": "CVE Program Container",
"references": [
{
"url": "https://lists.debian.org/debian-lts-announce/2025/04/msg00022.html"
}
],
"providerMetadata": {
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE",
"dateUpdated": "2025-11-03T19:32:16.045Z"
}
}
]
}Archived source JSONOSV · osv · full conditions
{
"id": "GHSA-q2x7-8rv6-6q7h",
"aliases": [
"CVE-2024-56326",
"PYSEC-2026-1475"
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "3.1.5"
}
]
}
],
"package": {
"name": "jinja2",
"purl": "pkg:pypi/jinja2",
"ecosystem": "PyPI"
},
"versions": [
"2.0",
"2.0rc1",
"2.1",
"2.1.1",
"2.10",
"2.10.1",
"2.10.2",
"2.10.3",
"2.11.0",
"2.11.1",
"2.11.2",
"2.11.3",
"2.2",
"2.2.1",
"2.3",
"2.3.1",
"2.4",
"2.4.1",
"2.5",
"2.5.1",
"2.5.2",
"2.5.3",
"2.5.4",
"2.5.5",
"2.6",
"2.7",
"2.7.1",
"2.7.2",
"2.7.3",
"2.8",
"2.8.1",
"2.9",
"2.9.1",
"2.9.2",
"2.9.3",
"2.9.4",
"2.9.5",
"2.9.6",
"3.0.0",
"3.0.0a1",
"3.0.0rc1",
"3.0.0rc2",
"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": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/12/GHSA-q2x7-8rv6-6q7h/GHSA-q2x7-8rv6-6q7h.json",
"last_known_affected_version_range": "<= 3.1.4"
}
}
],
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
},
{
"type": "CVSS_V4",
"score": "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"
}
],
"upstream": [],
"withdrawn": null,
"references": [
{
"url": "https://github.com/pallets/jinja/security/advisories/GHSA-q2x7-8rv6-6q7h",
"type": "WEB"
},
{
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-56326",
"type": "ADVISORY"
},
{
"url": "https://github.com/pallets/jinja/commit/48b0687e05a5466a91cd5812d604fa37ad0943b4",
"type": "WEB"
},
{
"url": "https://github.com/pallets/jinja",
"type": "PACKAGE"
},
{
"url": "https://github.com/pallets/jinja/releases/tag/3.1.5",
"type": "WEB"
},
{
"url": "https://lists.debian.org/debian-lts-announce/2025/04/msg00022.html",
"type": "WEB"
}
],
"relatedGitRanges": [],
"database_specific": {
"cwe_ids": [
"CWE-693"
],
"severity": "MODERATE",
"github_reviewed": true,
"nvd_published_at": "2024-12-23T16:15:07Z",
"github_reviewed_at": "2024-12-23T17:56:08Z"
}
}Archived source JSONOSV · osv · full conditions
{
"id": "PYSEC-2026-1475",
"aliases": [
"CVE-2024-56326",
"GHSA-q2x7-8rv6-6q7h"
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "3.1.5"
}
]
}
],
"package": {
"name": "jinja2",
"purl": "pkg:pypi/jinja2",
"ecosystem": "PyPI"
},
"versions": [
"2.0",
"2.0rc1",
"2.1",
"2.1.1",
"2.10",
"2.10.1",
"2.10.2",
"2.10.3",
"2.11.0",
"2.11.1",
"2.11.2",
"2.11.3",
"2.2",
"2.2.1",
"2.3",
"2.3.1",
"2.4",
"2.4.1",
"2.5",
"2.5.1",
"2.5.2",
"2.5.3",
"2.5.4",
"2.5.5",
"2.6",
"2.7",
"2.7.1",
"2.7.2",
"2.7.3",
"2.8",
"2.8.1",
"2.9",
"2.9.1",
"2.9.2",
"2.9.3",
"2.9.4",
"2.9.5",
"2.9.6",
"3.0.0",
"3.0.0a1",
"3.0.0rc1",
"3.0.0rc2",
"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": {
"source": "https://github.com/pypa/advisory-database/blob/main/vulns/jinja2/PYSEC-2026-1475.yaml"
}
}
],
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
},
{
"type": "CVSS_V4",
"score": "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"
}
],
"upstream": [],
"withdrawn": null,
"references": [
{
"url": "https://github.com/pallets/jinja/security/advisories/GHSA-q2x7-8rv6-6q7h",
"type": "WEB"
},
{
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-56326",
"type": "ADVISORY"
},
{
"url": "https://github.com/pallets/jinja/commit/48b0687e05a5466a91cd5812d604fa37ad0943b4",
"type": "FIX"
},
{
"url": "https://github.com/pallets/jinja",
"type": "PACKAGE"
},
{
"url": "https://github.com/pallets/jinja/releases/tag/3.1.5",
"type": "WEB"
},
{
"url": "https://lists.debian.org/debian-lts-announce/2025/04/msg00022.html",
"type": "WEB"
},
{
"url": "https://pypi.org/project/jinja2",
"type": "PACKAGE"
},
{
"url": "https://github.com/advisories/GHSA-q2x7-8rv6-6q7h",
"type": "ADVISORY"
}
],
"relatedGitRanges": [],
"database_specific": {}
}Archived source JSONCorrection evidence
Distribution packages and upstream releases are distinct. ESM channels may require the corresponding Ubuntu entitlement. Notes and branch ranges are not installable package versions. OSV fixed boundaries are ecosystem-specific version thresholds, not proof that a package is currently available or installed.
| Evidence type | Distribution / release | Package | Channel | Version or source note | Source |
|---|---|---|---|---|---|
| ecosystem-boundary | PyPI / package | jinja2 | Not a distribution channel | 3.1.5 | Official record |
Vendor notices and operational guidance
No connected vendor notice is available for this record.
Original sources and dates
- CISA KEVConsulted: 2026-11-19T17:28:52.703ZArchived source JSON
Source publication: not supplied
Source modification: 2026-11-18T19:17:41.0354ZDocument fingerprint
a35fdc67c7d9802988dcfc1d3ff1198da327948d1db122ab7692ac201055ac56 - OSVConsulted: 2026-11-19T12:52:20.708ZArchived source JSON
Source publication: 2024-12-23T17:56:08.000Z
Source modification: 2026-09-10T03:50:21.662ZDocument fingerprint
7242616d8a043e86d994dbcca49a09eafeef59c5fc65b72104a226bd701f645a - OSVConsulted: 2026-11-19T12:52:20.708ZArchived source JSON
Source publication: 2026-07-07T14:34:47.732Z
Source modification: 2026-07-07T17:46:13.842ZDocument fingerprint
7242616d8a043e86d994dbcca49a09eafeef59c5fc65b72104a226bd701f645a - CVE ProgramConsulted: 2026-11-19T12:57:21.367ZArchived source JSON
Source publication: 2024-12-23T15:43:49.400Z
Source modification: 2025-11-03T19:32:16.045ZDocument fingerprint
ce08ab444844b0bd199db6b3bda0fc55da3f159615494fcb490f6b349e461c84 - FIRST EPSSConsulted: 2026-11-19T16:04:39.514ZArchived source JSON
Source publication: not supplied
Source modification: not suppliedDocument fingerprint
c07aa8e6fdfc310c84fe1ac9be92e31e56fc57bead56722404a3841425dfa449
Official status history
- UNKNOWN → PUBLISHED · · evidence