Vulnerability
CVE-2024-34064
Jinja is an extensible templating engine. The `xmlattr` filter in affected versions of Jinja accepts keys containing non-attribute characters. XML/HTML attributes cannot contain spaces, `/`, `>`, or `=`, as each would then be interpreted as starting a separate attribute. If an application accepts keys (as opposed to only values) as user input, and renders these in pages that other users see as well, an attacker could use this to inject other attributes and perform XSS. The fix for CVE-2024-22195 only addressed spaces but not other characters. Accepting keys as user input is now explicitly considered an unintended use case of the `xmlattr` filter, and code that does so without otherwise validating the input should be flagged as insecure, regardless of Jinja version. Accepting _values_ as user input continues to be safe. This vulnerability is fixed in 3.1.4.
82 advisories report this vulnerability, across 15 ecosystems.
Advisories
-
ALAS2-2024-2573
Amazon Linux 2 2017.12 - ALAS2-2024-2573: medium priority package update for python3-jinja2
-
ALAS2-2024-2574
Amazon Linux 2 2017.12 - ALAS2-2024-2574: medium priority package update for python-jinja2
-
ALAS2023-2024-644
Amazon Linux 2023 - ALAS2023-2024-644: Medium priority package update for ansible-core
-
ALAS2023-2024-645
Amazon Linux 2023 - ALAS2023-2024-645: Medium priority package update for python-jinja2
-
ALPINE-CVE-2024-34064
Jinja is an extensible templating engine. The `xmlattr` filter in affected versions of Jinja accepts keys containing non-attribute characters. XML/HTML attributes cannot contain spaces, `/`, `>`, or `=`, as each would…
- ALPINE-EDGE-CVE-2024-34064
-
ALSA-2024:3820
Moderate: fence-agents security update
-
ALSA-2024:4231
Moderate: python-jinja2 security update
-
ALSA-2024:9150
Moderate: python-jinja2 security update
-
AZL-40369
CVE-2024-34064 affecting package python-jinja2 for versions less than 3.1.2-2
-
AZL-40420
CVE-2024-34064 affecting package nodejs for versions less than 20.14.0-1
-
AZL-40439
CVE-2024-34064 affecting package python-jinja2 for versions less than 3.0.3-4
-
AZL-40444
CVE-2024-34064 affecting package nodejs18 for versions less than 18.20.3-4
-
AZL-75801
CVE-2024-34064 affecting package nodejs24 for versions less than 24.13.0-1
- CGA-2688-7fh9-3xmp
- CGA-2cr9-425m-p54m
- CGA-2gwc-cr5c-8mh6
- CGA-3xf7-v455-6c2p
- CGA-4829-gg5f-77v2
- CGA-57fv-qmwx-f2rm
- CGA-5g4c-3vgv-mhgr
- CGA-5m74-fwv3-rp4h
- CGA-5vfc-hc4f-f73q
- CGA-675h-6jcc-pgpj
- CGA-7r3c-fwmj-3gvq
- CGA-88r4-396p-hw3p
- CGA-9m2w-4h79-fwrf
- CGA-9qg9-x9gf-8g7p
- CGA-c97j-qj88-34gp
- CGA-g5m2-7j99-755w
- CGA-hj27-qmpg-qh9h
- CGA-hq82-37mw-pfpv
- CGA-j8xr-m4gp-3m4r
- CGA-m8w9-66qx-vw6j
- CGA-mw66-62q6-w277
- CGA-pqh3-rpxr-vw63
- CGA-rq64-827c-2fmg
- CGA-v28q-662m-67mm
- CGA-vqf4-w3hq-g2gx
- CGA-vrqx-3v6m-vj36
- CGA-vvv7-x8f6-m2gf
- CGA-w57g-39wh-m5h6
- CGA-w665-h57w-r6rm
- CGA-x6pw-5g54-7hhj
-
DEBIAN-CVE-2024-34064
Jinja is an extensible templating engine. The `xmlattr` filter in affected versions of Jinja accepts keys containing non-attribute characters. XML/HTML attributes cannot contain spaces, `/`, `>`, or `=`, as each would…
-
DLA-3988-1
jinja2 - security update
-
ELSA-2024-3820
ELSA-2024-3820: fence-agents security update (MODERATE)
-
ELSA-2024-4231
ELSA-2024-4231: python-jinja2 security update (MODERATE)
-
ELSA-2024-9150
ELSA-2024-9150: python-jinja2 security update (MODERATE)
-
GHSA-h75v-3vvj-5mfj
Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter
-
OESA-2024-1605
python-jinja2 security update
-
PYSEC-2026-1474
Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter
-
RHSA-2024:3781
Red Hat Security Advisory: Red Hat Ansible Automation Platform 2.4 Product Security and Bug Fix Update
-
RHSA-2024:3795
Red Hat Security Advisory: fence-agents security update
-
RHSA-2024:3811
Red Hat Security Advisory: fence-agents security update
-
RHSA-2024:3820
Red Hat Security Advisory: fence-agents security update
-
RHSA-2024:4231
Red Hat Security Advisory: python-jinja2 security update
-
RHSA-2024:4404
Red Hat Security Advisory: fence-agents bug fix update
-
RHSA-2024:4414
Red Hat Security Advisory: fence-agents security update
-
RHSA-2024:4427
Red Hat Security Advisory: fence-agents security update
-
RHSA-2024:4522
Red Hat Security Advisory: Red Hat Ansible Automation Platform 2.4 Product Security and Bug Fix Update
-
RHSA-2024:4616
Red Hat Security Advisory: OpenShift Container Platform 4.16.4 packages and security update
-
RHSA-2024:4958
Red Hat Security Advisory: OpenShift Container Platform 4.15.25 packages and security update
-
RHSA-2024:5662
Red Hat Security Advisory: Satellite 6.15.3 Security Update
-
RHSA-2024:5810
Red Hat Security Advisory: OpenShift Container Platform 4.12.64 security update
-
RHSA-2024:6011
Red Hat Security Advisory: OpenShift Container Platform 4.13.49 packages and security update
-
RHSA-2024:9150
Red Hat Security Advisory: python-jinja2 security update
-
RHSA-2025:1335
Red Hat Security Advisory: RHUI 4.11 security, bugfix, and enhancement update
-
RHVEX-CVE-2024-34064
jinja2: accepts keys containing non-attribute characters
-
RLSA-2024:3820
Moderate: fence-agents security update
-
RLSA-2024:4231
Moderate: python-jinja2 security update
-
RLSA-2024:9150
Moderate: python-jinja2 security update
-
SUSE-SU-2024:1863-1
Security update for python-Jinja2
-
SUSE-SU-2024:1863-2
Security update for python-Jinja2
-
SUSE-SU-2024:1864-1
Security update for python-Jinja2
-
SUSE-SU-2024:1948-1
Security update for python-Jinja2
-
SUSE-SU-2025:20035-1
Security update for python-Jinja2
-
SUSEVEX-CVE-2024-34064
Jinja is an extensible templating engine. The `xmlattr` filter in affected versions of Jinja accepts keys containing non-attribute characters. XML/HTML attributes cannot contain spaces, `/`, `>`, or `=`, as each would…
-
UBUNTU-CVE-2024-34064
Jinja is an extensible templating engine. The `xmlattr` filter in affected versions of Jinja accepts keys containing non-attribute characters. XML/HTML attributes cannot contain spaces, `/`, `>`, or `=`, as each would…
-
USN-6787-1
jinja2 vulnerability
-
openSUSE-SU-2024:13930-1
python310-Jinja2-3.1.4-1.1 on GA media
-
openSUSE-SU-2026:11992-1
python313-Jinja2-3.1.6-2.4 on GA media
References
- https://github.com/pallets/jinja/commit/0668239dc6b44ef38e7a6c9f91f312fd4ca581cb
- https://github.com/pallets/jinja/security/advisories/GHSA-h75v-3vvj-5mfj
- https://lists.fedoraproject.org/archives/list/[email protected]/message/567XIGSZMABG6TSMYWD7MIYNJSUQQRUC/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/GCLF44KY43BSVMTE6S53B4V5WP3FRRSE/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/SSCBHIL6BYKR5NRCBXP4XMP2CEEKGFVS/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/ZALNWE3TXPPHVPSI3AZ5CTMSTAVN5UMS/
- https://lists.debian.org/debian-lts-announce/2024/12/msg00009.html