Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Partial Red Hat: 34 fixed, 11 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-79.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| pallets | jinja | before 3.1.4 | 3.1.4 | Patch available | CNA |
| — | Jinja2 (PyPI) | before 3.1.4 | 3.1.4 | Patch available | GHSA-h75v-3vvj-5mfj |
- jinja Vendorpallets Affected before 3.1.4 Fixed in 3.1.4 Patch available CNA
- Jinja2 (PyPI) Vendor— Affected before 3.1.4 Fixed in 3.1.4 Patch available GHSA-h75v-3vvj-5mfj
CPE configurations NVD · 3
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:palletsprojects:jinja:*:*:*:*:*:*:*:* | before 3.1.4 | Vulnerable | pallets |
| cpe:2.3:o:fedoraproject:fedora:39:*:*:*:*:*:*:* | 39 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:40:*:*:*:*:*:*:* | 40 | Vulnerable | Fedoraproject |
- cpe:2.3:a:palletsprojects:jinja:*:*:*:*:*:*:*:* Versions before 3.1.4 Vulnerable ·pallets
- cpe:2.3:o:fedoraproject:fedora:39:*:*:*:*:*:*:* Versions 39 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:40:*:*:*:*:*:*:* Versions 40 Vulnerable ·Fedoraproject
Remediation
- Fix · CNA jinja (pallets) Fixed in 3.1.4
- Fix · GHSA-h75v-3vvj-5mfj Jinja2 (PyPI) Fixed in 3.1.4 Advisory →
Red Hat 17 advisories
- RHSA-2025:1335 Released 2025-02-12 · Red Hat rating ImportantRHUI 4.11 security, bugfix, and enhancement update
- RHUI 4 for RHEL 8 python-aiohttp-3.9.4-1.el8ui, python-cryptography-42.0.8-1.el8ui, python-django-4.2.15-1.el8ui +13
- RHSA-2024:9150 Released 2024-11-12 · Red Hat rating Moderatepython-jinja2 security update
- Red Hat Enterprise Linux AppStream (v. 9) python-jinja2-2.11.3-6.el9, python3-jinja2-2.11.3-6.el9
- RHSA-2024:6011 Released 2024-09-04 · Red Hat rating ModerateOpenShift Container Platform 4.13.49 packages and security update
- Ironic content for Red Hat OpenShift Container Platform 4.13 python-jinja2-3.0.1-3.el9.1, python3-jinja2-3.0.1-3.el9.1
Show 14 more Red Hat advisories
- RHSA-2024:5810 Released 2024-08-29 · Red Hat rating ImportantOpenShift Container Platform 4.12.64 security update
- Ironic content for Red Hat OpenShift Container Platform 4.12 python-jinja2-3.0.1-3.el9.1, python-werkzeug-2.0.3-6.el9, python3-jinja2-3.0.1-3.el9.1 +1
- Red Hat OpenShift Container Platform 4.12 openshift-4.12.0-202408131833.p0.g1eb8682.assembly.stream.el8, openshift-4.12.0-202408131833.p0.g1eb8682.assembly.stream.el9, openshift-hyperkube-4.12.0-202408131833.p0.g1eb8682.assembly.stream.el8 +1
- RHSA-2024:5433 Released 2024-08-22 · Red Hat rating ImportantOpenShift Container Platform 4.14.35 security update
- Red Hat OpenShift Container Platform 4.14 openshift4/cloud-network-config-controller-rhel8, openshift4/driver-toolkit-rhel9, openshift4/egress-router-cni-rhel8 +47
- RHSA-2024:5662 Released 2024-08-20 · Red Hat rating ModerateSatellite 6.15.3 Security Update
- Red Hat Satellite 6.15 for RHEL 8 python-aiohttp-3.9.4-1.el8pc, python-django-4.2.14-1.el8pc, python-jinja2-3.1.4-1.el8pc +5
- RHSA-2024:4958 Released 2024-08-07 · Red Hat rating ModerateOpenShift Container Platform 4.15.25 packages and security update
- Ironic content for Red Hat OpenShift Container Platform 4.15 python-jinja2-3.0.1-3.el9.1, python3-jinja2-3.0.1-3.el9.1
- RHSA-2024:4616 Released 2024-07-24 · Red Hat rating ModerateOpenShift Container Platform 4.16.4 packages and security update
- Ironic content for Red Hat OpenShift Container Platform 4.16 python-jinja2-3.0.1-3.el9.1, python3-jinja2-3.0.1-3.el9.1
- Red Hat OpenShift Container Platform 4.16 openshift-clients-4.16.0-202407111006.p0.gfa84651.assembly.stream.el8, openshift-clients-4.16.0-202407111006.p0.gfa84651.assembly.stream.el9, openshift-clients-redistributable-4.16.0-202407111006.p0.gfa84651.assembly.stream.el8 +11
- RHSA-2024:4522 Released 2024-07-12 · Red Hat rating ModerateRed Hat Ansible Automation Platform 2.4 Product Security and Bug Fix Update
- Red Hat Ansible Automation Platform 2.4 for RHEL 8 automation-controller-venv-tower-4.5.8-1.el8ap
- Red Hat Ansible Automation Platform 2.4 for RHEL 9 automation-controller-venv-tower-4.5.8-1.el9ap
- RHSA-2024:4427 Released 2024-07-09 · Red Hat rating Moderatefence-agents security update
- Red Hat Enterprise Linux AppStream EUS (v.9.2) fence-agents-4.10.0-43.el9_2.6, fence-agents-common-4.10.0-43.el9_2.6, fence-agents-compute-4.10.0-43.el9_2.6 +11
- Red Hat Enterprise Linux High Availability EUS (v.9.2) fence-agents-aliyun-4.10.0-43.el9_2.6, fence-agents-all-4.10.0-43.el9_2.6, fence-agents-amt-ws-4.10.0-43.el9_2.6 +39
- Red Hat Enterprise Linux Resilient Storage EUS (v.9.2) fence-agents-aliyun-4.10.0-43.el9_2.6, fence-agents-all-4.10.0-43.el9_2.6, fence-agents-amt-ws-4.10.0-43.el9_2.6 +39
- RHSA-2024:4414 Released 2024-07-09 · Red Hat rating Moderatefence-agents security update
- Red Hat Enterprise Linux AppStream E4S (v.9.0) fence-agents-4.10.0-20.el9_0.13, fence-agents-common-4.10.0-20.el9_0.13, fence-agents-compute-4.10.0-20.el9_0.13 +12
- Red Hat Enterprise Linux High Availability E4S (v.9.0) fence-agents-aliyun-4.10.0-20.el9_0.13, fence-agents-all-4.10.0-20.el9_0.13, fence-agents-amt-ws-4.10.0-20.el9_0.13 +39
- Red Hat Enterprise Linux ResilientStorage E4S (v.9.0) fence-agents-aliyun-4.10.0-20.el9_0.13, fence-agents-all-4.10.0-20.el9_0.13, fence-agents-amt-ws-4.10.0-20.el9_0.13 +39
- RHSA-2024:4404 Released 2024-07-09 · Red Hat rating Moderatefence-agents bug fix update
- Red Hat Enterprise Linux AppStream AUS (v.8.6) fence-agents-4.2.1-89.el8_6.12, fence-agents-all-4.2.1-89.el8_6.12, fence-agents-amt-ws-4.2.1-89.el8_6.12 +39
- Red Hat Enterprise Linux AppStream E4S (v.8.6) fence-agents-4.2.1-89.el8_6.12, fence-agents-all-4.2.1-89.el8_6.12, fence-agents-amt-ws-4.2.1-89.el8_6.12 +39
- Red Hat Enterprise Linux AppStream TUS (v.8.6) fence-agents-4.2.1-89.el8_6.12, fence-agents-all-4.2.1-89.el8_6.12, fence-agents-amt-ws-4.2.1-89.el8_6.12 +39
- Red Hat Enterprise Linux High Availability E4S (v.8.6) fence-agents-aliyun-4.2.1-89.el8_6.12, fence-agents-aws-4.2.1-89.el8_6.12, fence-agents-azure-arm-4.2.1-89.el8_6.12 +1
- Red Hat Enterprise Linux High Availability TUS (v.8.6) fence-agents-aliyun-4.2.1-89.el8_6.12, fence-agents-aws-4.2.1-89.el8_6.12, fence-agents-azure-arm-4.2.1-89.el8_6.12 +1
- RHSA-2024:4231 Released 2024-07-02 · Red Hat rating Moderatepython-jinja2 security update
- Red Hat Enterprise Linux AppStream (v. 8) python-jinja2-2.10.1-5.el8_10, python3-jinja2-2.10.1-5.el8_10
- RHSA-2024:3820 Released 2024-06-11 · Red Hat rating Moderatefence-agents security update
- Red Hat Enterprise Linux AppStream (v. 9) fence-agents-4.10.0-62.el9_4.3, fence-agents-common-4.10.0-62.el9_4.3, fence-agents-compute-4.10.0-62.el9_4.3 +11
- Red Hat Enterprise Linux HighAvailability (v. 9) fence-agents-aliyun-4.10.0-62.el9_4.3, fence-agents-all-4.10.0-62.el9_4.3, fence-agents-amt-ws-4.10.0-62.el9_4.3 +39
- Red Hat Enterprise Linux ResilientStorage (v. 9) fence-agents-aliyun-4.10.0-62.el9_4.3, fence-agents-all-4.10.0-62.el9_4.3, fence-agents-amt-ws-4.10.0-62.el9_4.3 +39
- RHSA-2024:3811 Released 2024-06-11 · Red Hat rating Moderatefence-agents security update
- Red Hat Enterprise Linux AppStream EUS (v.8.8) fence-agents-4.2.1-112.el8_8.6, fence-agents-all-4.2.1-112.el8_8.6, fence-agents-amt-ws-4.2.1-112.el8_8.6 +40
- Red Hat Enterprise Linux High Availability EUS (v.8.8) fence-agents-aliyun-4.2.1-112.el8_8.6, fence-agents-aws-4.2.1-112.el8_8.6, fence-agents-azure-arm-4.2.1-112.el8_8.6 +2
- Red Hat Enterprise Linux Resilient Storage EUS (v.8.8) fence-agents-aliyun-4.2.1-112.el8_8.6, fence-agents-aws-4.2.1-112.el8_8.6, fence-agents-azure-arm-4.2.1-112.el8_8.6 +2
- RHSA-2024:3795 Released 2024-06-11 · Red Hat rating Moderatefence-agents security update
- Red Hat Enterprise Linux AppStream AUS (v.8.4) fence-agents-4.2.1-65.el8_4.15, fence-agents-all-4.2.1-65.el8_4.15, fence-agents-amt-ws-4.2.1-65.el8_4.15 +39
- Red Hat Enterprise Linux AppStream E4S (v.8.4) fence-agents-4.2.1-65.el8_4.15, fence-agents-all-4.2.1-65.el8_4.15, fence-agents-amt-ws-4.2.1-65.el8_4.15 +39
- Red Hat Enterprise Linux AppStream TUS (v.8.4) fence-agents-4.2.1-65.el8_4.15, fence-agents-all-4.2.1-65.el8_4.15, fence-agents-amt-ws-4.2.1-65.el8_4.15 +39
- Red Hat Enterprise Linux High Availability AUS (v.8.4) fence-agents-aliyun-4.2.1-65.el8_4.15, fence-agents-aws-4.2.1-65.el8_4.15, fence-agents-azure-arm-4.2.1-65.el8_4.15 +1
- Red Hat Enterprise Linux HighAvailability E4S (v.8.4) fence-agents-aliyun-4.2.1-65.el8_4.15, fence-agents-aws-4.2.1-65.el8_4.15, fence-agents-azure-arm-4.2.1-65.el8_4.15 +1
- Red Hat Enterprise Linux HighAvailability TUS (v.8.4) fence-agents-aliyun-4.2.1-65.el8_4.15, fence-agents-aws-4.2.1-65.el8_4.15, fence-agents-azure-arm-4.2.1-65.el8_4.15 +1
- RHSA-2024:3781 Released 2024-06-10 · Red Hat rating ModerateRed Hat Ansible Automation Platform 2.4 Product Security and Bug Fix Update
- Red Hat Ansible Automation Platform 2.4 for RHEL 8 automation-controller-venv-tower-4.5.7-1.el8ap, automation-hub-4.9.2-1.el8ap, python39-aiohttp-3.9.5-1.el8ap +25
- Red Hat Ansible Automation Platform 2.4 for RHEL 9 automation-controller-venv-tower-4.5.7-1.el9ap, automation-hub-4.9.2-1.el9ap, python-aiohttp-3.9.5-1.el9ap +25
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Ansible Automation Platform 1.2 | Affected | No fix planned: Out of support scope |
| Red Hat Ceph Storage 5 | Affected | No fix planned: Out of support scope |
| Red Hat Ceph Storage 6 | Affected | No fix planned: Will not fix |
| Red Hat Enterprise Linux 6 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 7 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 8 | Affected | No fix yet |
| Red Hat OpenShift Container Platform 4 | Affected | No fix yet |
| Red Hat OpenStack Platform 18.0 | Affected | No fix yet |
| Red Hat Quay 3 | Affected | No fix yet |
| Red Hat Software Collections | Affected | No fix planned: Will not fix |
| Red Hat Storage 3 | Affected | No fix planned: Out of support scope |
| Ironic content for Red Hat OpenShift Container Platform 4.12 | Fixed | RHSA-2024:5810 |
| Ironic content for Red Hat OpenShift Container Platform 4.13 | Fixed | RHSA-2024:6011 |
| Ironic content for Red Hat OpenShift Container Platform 4.15 | Fixed | RHSA-2024:4958 |
| Ironic content for Red Hat OpenShift Container Platform 4.16 | Fixed | RHSA-2024:4616 |
| RHUI 4 for RHEL 8 | Fixed | RHSA-2025:1335 |
| Red Hat Ansible Automation Platform 2.4 for RHEL 8 | Fixed | RHSA-2024:3781, RHSA-2024:4522 |
| Red Hat Ansible Automation Platform 2.4 for RHEL 9 | Fixed | RHSA-2024:3781, RHSA-2024:4522 |
| Red Hat Developer Hub 1.2 for RHEL 9 | Fixed | — |
| Red Hat Enterprise Linux AppStream (v. 8) | Fixed | RHSA-2024:4231 |
| Red Hat Enterprise Linux AppStream (v. 9) | Fixed | RHSA-2024:3820, RHSA-2024:9150 |
| Red Hat Enterprise Linux AppStream AUS (v.8.4) | Fixed | RHSA-2024:3795 |
| Red Hat Enterprise Linux AppStream AUS (v.8.6) | Fixed | RHSA-2024:4404 |
| Red Hat Enterprise Linux AppStream E4S (v.8.4) | Fixed | RHSA-2024:3795 |
| Red Hat Enterprise Linux AppStream E4S (v.8.6) | Fixed | RHSA-2024:4404 |
| Red Hat Enterprise Linux AppStream E4S (v.9.0) | Fixed | RHSA-2024:4414 |
| Red Hat Enterprise Linux AppStream EUS (v.8.8) | Fixed | RHSA-2024:3811 |
| Red Hat Enterprise Linux AppStream EUS (v.9.2) | Fixed | RHSA-2024:4427 |
| Red Hat Enterprise Linux AppStream TUS (v.8.4) | Fixed | RHSA-2024:3795 |
| Red Hat Enterprise Linux AppStream TUS (v.8.6) | Fixed | RHSA-2024:4404 |
| Red Hat Enterprise Linux High Availability AUS (v.8.4) | Fixed | RHSA-2024:3795 |
| Red Hat Enterprise Linux High Availability E4S (v.8.6) | Fixed | RHSA-2024:4404 |
| Red Hat Enterprise Linux High Availability E4S (v.9.0) | Fixed | RHSA-2024:4414 |
| Red Hat Enterprise Linux High Availability EUS (v.8.8) | Fixed | RHSA-2024:3811 |
| Red Hat Enterprise Linux High Availability EUS (v.9.2) | Fixed | RHSA-2024:4427 |
| Red Hat Enterprise Linux High Availability TUS (v.8.6) | Fixed | RHSA-2024:4404 |
| Red Hat Enterprise Linux HighAvailability (v. 9) | Fixed | RHSA-2024:3820 |
| Red Hat Enterprise Linux HighAvailability E4S (v.8.4) | Fixed | RHSA-2024:3795 |
| Red Hat Enterprise Linux HighAvailability TUS (v.8.4) | Fixed | RHSA-2024:3795 |
| Red Hat Enterprise Linux Resilient Storage EUS (v.8.8) | Fixed | RHSA-2024:3811 |
| Red Hat Enterprise Linux Resilient Storage EUS (v.9.2) | Fixed | RHSA-2024:4427 |
| Red Hat Enterprise Linux ResilientStorage (v. 9) | Fixed | RHSA-2024:3820 |
| Red Hat Enterprise Linux ResilientStorage E4S (v.9.0) | Fixed | RHSA-2024:4414 |
| Red Hat OpenShift Container Platform 4.14 | Fixed | RHSA-2024:5433 |
| Red Hat Satellite 6.15 for RHEL 8 | Fixed | RHSA-2024:5662 |
Not affected: 22 products
- Ironic content for Red Hat OpenShift Container Platform 4.12
- RHUI 4 for RHEL 8
- Red Hat Ansible Automation Platform 2
- Red Hat Ansible Automation Platform 2.4 for RHEL 8
- Red Hat Ansible Automation Platform 2.4 for RHEL 9
- Red Hat Ceph Storage 7
- Red Hat Ceph Storage 8
- Red Hat Ceph Storage 9
- Red Hat Developer Hub 1
- Red Hat Developer Hub 1.2 for RHEL 9
- Red Hat Discovery 1
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat Enterprise Linux AppStream E4S (v.8.6)
- Red Hat OpenShift Container Platform 4
- Red Hat OpenShift Container Platform 4.12
- Red Hat OpenShift Container Platform 4.13
- Red Hat OpenShift Container Platform 4.15
- Red Hat OpenShift Container Platform 4.16
- Red Hat OpenStack Platform 17.1
- Red Hat Satellite 6.15 for RHEL 8
Timeline
- 2026-10-02 Threatist record created from CVE-2024-34064
- 2026-10-03 Alias added: GHSA-h75v-3vvj-5mfj
- 2026-10-27 Affected versions changed · Red Hat
References
Advisory 2
Other 10
- https://lists.fedoraproject.org/archives/list/[email protected]/message/SSCBHIL6BYKR5NRCBXP4XMP2CEEKGFVS/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/GCLF44KY43BSVMTE6S53B4V5WP3FRRSE/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/ZALNWE3TXPPHVPSI3AZ5CTMSTAVN5UMS/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/567XIGSZMABG6TSMYWD7MIYNJSUQQRUC/
- https://github.com/pallets/jinja
- https://lists.debian.org/debian-lts-announce/2024/12/msg00009.html
- 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
More pallets Jinja vulnerabilities
- TI-2019-08127 In Pallets Jinja before 2.10.1, str.format_map allows a sandbox escape. CVSS 3.1HIGH 8.6
- TI-2016-08785 In Pallets Jinja before 2.8.1, str.format allows a sandbox escape. CVSS 3.0HIGH 8.6
- TI-2020-17297 Regular expression denial of service (ReDoS) in jinja2 CVSS 3.1MEDIUM 5.3
- TI-2024-14788 Jinja vulnerable to Cross-Site Scripting (XSS) CVSS 3.1MEDIUM 6.1
- TI-2025-20348 Jinja sandbox breakout through attr filter selecting format method CVSS 4.0MEDIUM 5.4
- TI-2024-37287 Jinja has a sandbox breakout through indirect reference to format method CVSS 4.0MEDIUM 5.4
Sources
- CVE-2024-34064 · CVE Program
- CVE-2024-34064 · NVD
- FIRST EPSS
- GHSA-h75v-3vvj-5mfj · GitHub Advisory Database · CC BY 4.0
- CVE-2024-34064 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences