CVE-2024-34064: Jinja - Stored XSS
- Cve: CVE-2024-34064
- Name: Jinja - Stored XSS
- 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.
- Impact: Attackers can inject malicious attributes leading to cross-site scripting (XSS) attacks, compromising user security and data integrity.
- Remediation: Update to version 3.1.4 or later.
- Vulnerability type: template_injection
- Vulnerability impact: client_script_exec
- Requirement type: none
- Labels source: projectdiscovery
- Severity: medium
- Cvss score: 5.4
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
- Epss score: 0.00979
- Epss percentile: 0.63074
- Assignee: [email protected]
- Published at: 2024-05-06T15:15:23Z
- Age in days: 932
- Modified at: 2026-06-17T07:32:50Z
- Patch available: yes
- Public exploits total: 7
- References total: 7
- Products total: 2
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2024-34064
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation |
Public exploits
Same in every row:
- Source: poc-in-github
| Url | Added date |
|---|---|
| https://github.com/SandBlastx/flask-vuln-v6 | 2026-03-10 |
| https://github.com/SandBlastx/flask-vuln-v5 | 2026-03-10 |
| https://github.com/SandBlastx/flask-vuln-v1 | 2026-03-09 |
| https://github.com/SandBlastx/flask-vuln-v2 | 2026-03-09 |
| https://github.com/SandBlastx/flask-vuln-baseline | 2026-03-09 |
References
Same in every row:
- Source: nvd
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| palletsprojects:jinja | < 3.1.4 | no | nvd | /v1/products/palletsprojects/jinja |
| fedoraproject:fedora | = 40, = 39 | no | nvd | /v1/products/fedoraproject/fedora |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| pallets/jinja | commit, package, security_advisory | yes | /v1/repositories/pallets/jinja |
Index
- Repositories: 1764
- Repositories high signal: 906
- Packages: 1
Exploitation
- Public exploit: yes
- Public exploit count: 7
- Public exploit first date: 2026-03-09
- Remote: yes
- Exposed hosts: 49161
- Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports