CVE-2024-34064: Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter
Vulnerability summary
CVE-2024-34064 is a medium (CVSS 5.4) vulnerability in fedoraproject fedora. EPSS estimates a 0.98% chance of exploitation in the next 30 days, higher than 62.2% of scored vulnerabilities.
Not severe (CVSS 5.4, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 14 · Related 16Timeline
- 06-05-2024PublishedVulnerability first disclosed.
- 03-11-2025Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
9 scores · 9 sources · 1 version- OSV · AlpineEcosystem advisory · calculated5.4MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
- OSV · PypiEcosystem advisory · calculated5.4MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
- OSV · Red hatEcosystem advisory · calculated5.4MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
- OSV · UbuntuEcosystem advisory · calculated5.4MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
- OSV · DebianEcosystem advisory · calculated5.4MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
- OSV · WolfiEcosystem advisory · calculated5.4MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
- OSV · ChainguardEcosystem advisory · calculated5.4MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
- NVDNIST5.4MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
EPSS trend
Probability
0.98%
Chance of exploitation in the next 30 days
Percentile
62%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.98% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Redhat73 products
- fence-agents< 0:4.2.1-65.el8_4.15 | < 0:4.2.1-112.el8_8.6 | < 0:4.10.0-62.el9_4.3 | < 0:4.2.1-89.el8_6.12 | < 0:4.10.0-20.el9_0.13 | < 0:4.10.0-43.el9_2.6
- fence-agents-aliyun< 0:4.2.1-65.el8_4.15 | < 0:4.2.1-112.el8_8.6 | < 0:4.10.0-62.el9_4.3 | < 0:4.2.1-89.el8_6.12 | < 0:4.10.0-20.el9_0.13 | < 0:4.10.0-43.el9_2.6
- fence-agents-aliyun-debuginfo< 0:4.2.1-65.el8_4.15 | < 0:4.2.1-112.el8_8.6 | < 0:4.2.1-89.el8_6.12
- fence-agents-all< 0:4.2.1-65.el8_4.15 | < 0:4.2.1-112.el8_8.6 | < 0:4.10.0-62.el9_4.3 | < 0:4.2.1-89.el8_6.12 | < 0:4.10.0-20.el9_0.13 | < 0:4.10.0-43.el9_2.6
- fence-agents-amt-ws< 0:4.2.1-65.el8_4.15 | < 0:4.2.1-112.el8_8.6 | < 0:4.10.0-62.el9_4.3 | < 0:4.2.1-89.el8_6.12 | < 0:4.10.0-20.el9_0.13 | < 0:4.10.0-43.el9_2.6
Chainguard16 products
- checkov< 3.0.34-r1
- confluent-docker-utils< 0.0.77-r0
- dask-gateway< 2024.1.0-r4
- dask-gateway-server< 2024.1.0-r4
- kubeflow-jupyter-web-app< 1.8.0-r7
Wolfi15 products
- checkov< 3.0.34-r1
- confluent-docker-utils< 0.0.77-r0
- dask-gateway< 2024.1.0-r4
- dask-gateway-server< 2024.1.0-r4
- kubeflow-jupyter-web-app< 1.8.0-r7
Suse3 products
- python-Jinja2&distro=SUSE Linux Enterprise Module for Advanced Systems Management 12< 2.8-19.26.1
- python-Jinja2&distro=SUSE Linux Enterprise Module for Public Cloud 12< 2.8-19.26.1
- python-Jinja2&distro=SUSE Manager Client Tools 12< 2.8-19.26.1
Alpine1 product
- py3-jinja2< 3.1.4-r0
Debian1 product
- jinja2< 3.1.2-1+deb12u1 | < 3.1.3-1.1
Fedoraproject1 product
- fedoraEOL39 | 40
Pallets1 product
- jinja< 3.1.4
Palletsprojects1 product
- jinja< 3.1.4
PyPI1 product
- jinja2< 3.1.4
Ubuntu1 product
- jinja2< 2.7.2-2ubuntu0.1~esm3 | < 2.8-1ubuntu0.1+esm3 | < 2.10-1ubuntu0.18.04.1+esm2 | < 2.10.1-2ubuntu0.3 | < 3.0.3-1ubuntu0.2 | < 3.1.2-1ubuntu1.1
11 vendors · 114 products
References
49 links- github.com/pallets/jinja/security/advisories/GHSA-h75v-3vvj-5mfjX Refsource CONFIRMWEBARTICLEREPORTAdvisoryVendor Advisory
- github.com/pallets/jinja/commit/0668239dc6b44ef38e7a6c9f91f312fd4ca581cbX Refsource MISCWEBFIXREPORTPatch
Show all 49 references
- github.com/pallets/jinjaPACKAGE
- pypi.org/project/jinja2PACKAGE