5.4

CVE-2024-34064: Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter

Modified
AliasesALPINE-CVE-2024-34064SUSE-SU-2024:1948-1GHSA-h75v-3vvj-5mfj
Published 06-05-2024Last modified 03-11-2025

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.

Priority
Routine

Not severe (CVSS 5.4, network access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
5.4/10
010
Medium · v3.1 (CVE.org)
EPSS score
0.98%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 14 · Related 16

Timeline

  1. 06-05-2024
    PublishedVulnerability first disclosed.
  2. 03-11-2025
    Last 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

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

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

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
Pallets1 product
Palletsprojects1 product
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
Show all 49 references