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

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.

Published: 2024-05-06 Last update: 2025-11-03 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2024-34064 is rated Moderate Risk (41.5/100): CVSS Medium severity, with medium exploitation likelihood (EPSS 0.98%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2024-34064

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 1.23% 0.98% -0.25%
2 2026-05-25 0.94% 1.23% +0.29%
3 2026-05-22 0.94%

Full EPSS history (19 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2024-34064

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
5.4 3.1 MEDIUM
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:N)
Service keeps running; no real outage angle.
2.8 2.5 [email protected]
5.4 3.1 MEDIUM
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:N)
Service keeps running; no real outage angle.
2.8 2.5 134c704f-9b21-4f2e-91b3-4a467353bcc0

Weakness enumeration for CVE-2024-34064

GitHub Security Advisory for CVE-2024-34064

GHSA-h75v-3vvj-5mfj · Severity: medium · Ecosystem: pip — Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter

OS Trackers for CVE-2024-34064

vendor priority summary link
alpine medium CVE-2024-34064: 1 source package rows (py3-jinja2); 7 state rows across 7 repos (3.17-main, 3.18-main, 3.19-main, 3.20-main, 3.21-main, 3.22-main, edge-main); fixed 7, open 0. https://security.alpinelinux.org/vuln/CVE-2024-34064
debian not yet assigned CVE-2024-34064 not yet assigned priority: Debian including 1 source packages (jinja2), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2024-34064
redhat medium https://access.redhat.com/security/cve/CVE-2024-34064
suse medium CVE-2024-34064 severity moderate: SUSE including 309 source package names (0.3.2-1.2:python311-Jinja2-3.1.2-150400.12.6.1, 0.3.32-3.4:python311-Jinja2-3.1.2-150400.12.6.1, …), 570 product×package rows across 258 product lines (Container containers/lmcache-vllm-openai, Container containers/open-webui, … (258 product lines)): Fixed 353, Known Affected 212, Will Not Fix 5. https://www.suse.com/security/cve/CVE-2024-34064/
ubuntu medium CVE-2024-34064 medium priority: Ubuntu including 1 source packages (jinja2), 10 status rows across 10 suites (bionic, focal, jammy, mantic, noble, oracular, plucky, trusty, upstream, xenial): released 10. https://ubuntu.com/security/CVE-2024-34064

Affected software / configurations for CVE-2024-34064

Vendor Product Version Raw CPE
palletsprojects jinja < 3.1.4 cpe:2.3:a:palletsprojects:jinja:*:*:*:*:*:*:*:*
fedoraproject fedora 39 cpe:2.3:o:fedoraproject:fedora:39:*:*:*:*:*:*:*
fedoraproject fedora 40 cpe:2.3:o:fedoraproject:fedora:40:*:*:*:*:*:*:*

References for CVE-2024-34064

cvelogic Threat Intelligence