Vulnerability
CVE-2024-56326
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.
133 advisories report this vulnerability, across 15 ecosystems.
Advisories
-
ALAS2-2025-2734
Amazon Linux 2 2017.12 - ALAS2-2025-2734: important priority package update for python-jinja2
-
ALAS2-2025-2735
Amazon Linux 2 2017.12 - ALAS2-2025-2735: important priority package update for python3-jinja2
-
ALAS2023-2025-810
Amazon Linux 2023 - ALAS2023-2025-810: Important priority package update for python-jinja2
-
ALAS2023-2025-811
Amazon Linux 2023 - ALAS2023-2025-811: Important priority package update for ansible-core
-
ALPINE-CVE-2024-56326
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…
- ALPINE-EDGE-CVE-2024-56326
-
ALSA-2025:0308
Important: fence-agents security update
-
ALSA-2025:0667
Important: python-jinja2 security update
-
ALSA-2025:0711
Important: python-jinja2 security update
-
AZL-54647
CVE-2024-56326 affecting package python-jinja2 for versions less than 3.0.3-5
-
AZL-54654
CVE-2024-56326 affecting package python-jinja2 for versions less than 3.1.2-2
- CGA-2q44-fj2c-jhhq
- CGA-35xj-82gg-x5r6
- CGA-3772-gm37-3938
- CGA-3874-vgj4-7mjg
- CGA-3883-q5x7-hqv9
- CGA-422f-vxxr-p735
- CGA-44v7-q94m-vhc4
- CGA-4vjx-hv3w-qj4q
- CGA-5m2h-hm62-pmhj
- CGA-5vpc-v6rg-qwvf
- CGA-69xr-frmf-79hp
- CGA-6j77-8p7f-p89g
- CGA-6rwm-g8m3-q6h4
- CGA-7g58-qm8p-4h2c
- CGA-7hjx-8p4x-4hfx
- CGA-7x6m-972g-24pc
- CGA-83f8-wp4h-h8f6
- CGA-83hr-r426-pgrq
- CGA-8548-mh96-q8rf
- CGA-88hv-6c76-c73g
- CGA-8fpw-8wg5-5639
- CGA-8g65-782w-rcm2
- CGA-8hm5-rpxf-rh9w
- CGA-8hmg-7c4j-8668
- CGA-8mq3-3hw9-23gm
- CGA-8w3r-5v78-3v5g
- CGA-95w8-7h75-r276
- CGA-975r-rpjp-pxhf
- CGA-c533-qjf4-93px
- CGA-c777-8hq8-h5wx
- CGA-chpj-973q-74x9
- CGA-cj5p-c72r-c4cq
- CGA-cjg7-xj8r-r48r
- CGA-f2gv-8fjm-wp99
- CGA-f3p3-w224-fg2p
- CGA-fmf6-phj2-25qv
- CGA-fmgq-5v44-8gxg
- CGA-g5mc-7g9w-c4v2
- CGA-h485-pfmv-5xf2
- CGA-hcfr-rm4w-rpf9
- CGA-hqv2-gxmc-rhq2
- CGA-hx47-xrcm-cjwv
- CGA-j632-54qc-wr2m
- CGA-j9q4-76xh-rqr6
- CGA-jrqr-v6vp-6rfw
- CGA-m6hc-52rj-6cmp
- CGA-mmrg-wpmp-hwx3
- CGA-mrqx-xjhh-fv89
- CGA-pc66-88hh-h93r
- CGA-pgc9-2jx9-6cx7
- CGA-q438-8vxc-8m2q
- CGA-q84f-43qj-4pxp
- CGA-q8g6-fv6h-hh7j
- CGA-qff7-m8xq-m75r
- CGA-r2jq-2cc6-gph2
- CGA-r443-mx5r-hphp
- CGA-r76x-hqfj-5x5x
- CGA-r959-cw72-rf67
- CGA-rc4q-m8rm-3w3x
- CGA-rhpc-6r94-wqf4
- CGA-vj68-2v2x-wgw6
- CGA-wcg2-7f8w-wmwj
- CGA-wm69-6r38-gh9c
- CGA-wmrf-vxh5-42pq
- CGA-wvr3-p5r8-wg7j
- CGA-x44v-pcv7-63p3
- CGA-x87q-r6w6-hcq3
- CGA-x9rq-wr6j-h6vx
-
DEBIAN-CVE-2024-56326
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…
-
DLA-4126-1
jinja2 - security update
-
ELSA-2025-0308
ELSA-2025-0308: fence-agents security update (IMPORTANT)
-
ELSA-2025-0667
ELSA-2025-0667: python-jinja2 security update (IMPORTANT)
-
ELSA-2025-0711
ELSA-2025-0711: python-jinja2 security update (IMPORTANT)
-
ELSA-2025-1250
ELSA-2025-1250: python-jinja2 security update (MODERATE)
-
GHSA-q2x7-8rv6-6q7h
Jinja has a sandbox breakout through indirect reference to format method
-
OESA-2024-2597
python-jinja2 security update
-
OESA-2024-2598
python-jinja2 security update
-
OESA-2025-1004
python-jinja2 security update
-
OESA-2025-1005
python-jinja2 security update
-
OESA-2025-1006
python-jinja2 security update
-
OESA-2025-1030
python-jinja2 security update
-
PYSEC-2026-1475
Jinja has a sandbox breakout through indirect reference to format method
-
RHBA-2025:3029
Red Hat Bug Fix Advisory: Release of components for RHOSO 18.0.6 (Feature Release 2)
-
RHEA-2024:6126
Red Hat Enhancement Advisory: OpenShift Container Platform 4.18.1 packages and security update
-
RHSA-2025:0308
Red Hat Security Advisory: fence-agents security update
-
RHSA-2025:0335
Red Hat Security Advisory: fence-agents security update
-
RHSA-2025:0338
Red Hat Security Advisory: fence-agents security update
-
RHSA-2025:0345
Red Hat Security Advisory: fence-agents security update
-
RHSA-2025:0656
Red Hat Security Advisory: OpenShift Container Platform 4.17.14 packages and security update
Showing the first 100. The API lists them all: /api/v1/vulnerabilities/CVE-2024-56326.