{"cve":"CVE-2024-34064","nvd":{"published":"2024-05-06T15:15:23.803","modified":"2026-06-17T07:32:50.200","status":"Modified","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_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","score":5.4},"cwes":["CWE-79"],"references":["https://github.com/pallets/jinja/commit/0668239dc6b44ef38e7a6c9f91f312fd4ca581cb","https://github.com/pallets/jinja/security/advisories/GHSA-h75v-3vvj-5mfj","https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/567XIGSZMABG6TSMYWD7MIYNJSUQQRUC/","https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GCLF44KY43BSVMTE6S53B4V5WP3FRRSE/","https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SSCBHIL6BYKR5NRCBXP4XMP2CEEKGFVS/"],"products":["fedoraproject:fedora","palletsprojects:jinja"],"source":"nvd","synced_at":"2026-10-19T21:49:23.840078609+00:00"},"epss":{"cve":"CVE-2024-34064","score":0.00979,"percentile":0.62193,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-h75v-3vvj-5mfj","url":"https://osv.dev/vulnerability/GHSA-h75v-3vvj-5mfj","summary":"Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter","modified":"2026-09-10T03:50:13.786450101Z","packages":[{"ecosystem":"PyPI","name":"jinja2","purl":"pkg:pypi/jinja2","ranges":["<3.1.4"],"fixed":["3.1.4"]}]},{"id":"PYSEC-2026-1474","url":"https://osv.dev/vulnerability/PYSEC-2026-1474","summary":"Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter","modified":"2026-07-07T17:46:13.832160246Z","packages":[{"ecosystem":"PyPI","name":"jinja2","purl":"pkg:pypi/jinja2","ranges":["<3.1.4"],"fixed":["3.1.4"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}