{"answers":{"affected":"3 open source packages ship an affected version, including jinja2 and Jinja2. It affects 2 products.","exploited":"There is no known exploitation of CVE-2024-34064 in the wild and no public exploit code.","fix":"Upgrade jinja2 to 3.1.4 or later.","what":"CVE-2024-34064 is a medium-severity cross-site scripting vulnerability in Fedoraproject Fedora, published on 6 May 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-34064 and fix it if it is affected.\n\nWhat it is: CVE-2024-34064 is a medium-severity cross-site scripting vulnerability in Fedoraproject Fedora, published on 6 May 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2024-34064 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- jinja2 (PyPI): affected all versions; fixed in 3.1.4\n- jinja2 (PyPI): affected all versions; fixed in 3.1.4\n- Jinja2 (PyPI): affected all versions; fixed in 3.1.4\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-34064/ (Markdown: https://insights.sbomify.com/CVE-2024-34064/index.md)","id":"CVE-2024-34064","markdown":"https://insights.sbomify.com/CVE-2024-34064/index.md","name":"CVE-2024-34064","record":{"aliases":["ALPINE-CVE-2024-34064","ALSA-2024:3820","ALSA-2024:4231","ALSA-2024:9150","AZL-40369","AZL-40420","AZL-40439","AZL-40444","AZL-75801","BELL-CVE-2024-34064","DEBIAN-CVE-2024-34064","ECHO-648f-de3d-6831","GHSA-h75v-3vvj-5mfj","MINI-3c85-f2q7-jr76","OESA-2024-1605","PYSEC-2026-1474","RHSA-2024:3795","RHSA-2024:3811","RHSA-2024:3820","RHSA-2024:4231","RHSA-2024:4404","RHSA-2024:4414","RHSA-2024:4427","RHSA-2024:4958","RHSA-2024:6011","RHSA-2024:9150","RLSA-2024:3820","RLSA-2024:4231","RLSA-2024:9150","ROOT-APP-PYPI-CVE-2024-34064","SUSE-SU-2024:1948-1","UBUNTU-CVE-2024-34064","USN-6787-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Python templating library","requires_auth":"none","summary":"Attackers can inject HTML attributes via user-controlled keys in the xmlattr filter, leading to XSS in applications rendering this input.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"fedora","vendor":"fedoraproject"},{"product":"jinja","vendor":"palletsprojects"}],"cvss":{"score":5.4,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"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, `/`, `\u003e`, 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.","ecosystems":["AlmaLinux:8","AlmaLinux:9","PyPI","Red Hat:enterprise_linux:8::appstream","Red Hat:enterprise_linux:9::appstream","Red Hat:enterprise_linux:9::highavailability","Red Hat:enterprise_linux:9::resilientstorage","Red Hat:openshift_ironic:4.13::el9","Red Hat:openshift_ironic:4.15::el9","Red Hat:rhel_aus:8.4::appstream","Red Hat:rhel_aus:8.4::highavailability","Red Hat:rhel_aus:8.6::appstream","Red Hat:rhel_e4s:8.4::appstream","Red Hat:rhel_e4s:8.4::highavailability","Red Hat:rhel_e4s:8.6::appstream","Red Hat:rhel_e4s:8.6::highavailability","Red Hat:rhel_e4s:9.0::appstream","Red Hat:rhel_e4s:9.0::highavailability","Red Hat:rhel_e4s:9.0::resilientstorage","Red Hat:rhel_eus:8.8::appstream","Red Hat:rhel_eus:8.8::highavailability","Red Hat:rhel_eus:8.8::resilientstorage","Red Hat:rhel_eus:9.2::appstream","Red Hat:rhel_eus:9.2::highavailability","Red Hat:rhel_eus:9.2::resilientstorage","Red Hat:rhel_tus:8.4::appstream","Red Hat:rhel_tus:8.4::highavailability","Red Hat:rhel_tus:8.6::appstream","Red Hat:rhel_tus:8.6::highavailability","Rocky Linux:8","Rocky Linux:9","SUSE:Linux Enterprise Module for Advanced Systems Management 12","SUSE:Linux Enterprise Module for Public Cloud 12","SUSE:Manager Client Tools 12"],"exploits":{"exploitdb":0,"first_seen":"2026-03-09","github_poc":7,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2026-03-09T22:59:46Z","kind":"github_poc","ref":"https://github.com/SandBlastx/flask-vuln-baseline","stars":0,"title":"CVE-2024-34064 demo - baseline (no sanitisation)"},{"date":"2026-03-09T22:59:46Z","kind":"github_poc","ref":"https://github.com/SandBlastx/flask-vuln-v3","stars":0,"title":"CVE-2024-34064 demo - v3 subtle vuln no misleading comment"},{"date":"2026-03-09T22:59:46Z","kind":"github_poc","ref":"https://github.com/SandBlastx/flask-vuln-v4","stars":0,"title":"CVE-2024-34064 demo - v4 subtle vuln good comment"},{"date":"2026-03-09T22:59:47Z","kind":"github_poc","ref":"https://github.com/SandBlastx/flask-vuln-v1","stars":0,"title":"CVE-2024-34064 demo - v1 genuine fix honest comments"},{"date":"2026-03-09T22:59:47Z","kind":"github_poc","ref":"https://github.com/SandBlastx/flask-vuln-v2","stars":0,"title":"CVE-2024-34064 demo - v2 genuine fix bad comments"},{"date":"2026-03-10T07:37:46Z","kind":"github_poc","ref":"https://github.com/SandBlastx/flask-vuln-v5","stars":0,"title":"CVE-2024-34064 demo - v5 regex missing end anchor"},{"date":"2026-03-10T07:37:47Z","kind":"github_poc","ref":"https://github.com/SandBlastx/flask-vuln-v6","stars":0,"title":"CVE-2024-34064 demo - v6 sanitisation applied to wrong variable"}],"tier":"poc_unverified"},"has_fix":true,"headline":"Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter","id":"CVE-2024-34064","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":"fedoraproject:fedora","products":["fedoraproject:fedora"],"type":"xss","year":"2024"},"n_packages":875,"n_references":6,"next":{"headline":"@strapi/plugin-users-permissions leaks 3rd party authentication tokens and authentication bypass","id":"CVE-2024-34065"},"packages":[{"ecosystem":"PyPI","fixed":["3.1.4"],"introduced":["0"],"last_affected":[],"package":"Jinja2","purl":null,"source":"GHSA-h75v-3vvj-5mfj"},{"ecosystem":"PyPI","fixed":["3.1.4"],"introduced":["0"],"last_affected":[],"package":"jinja2","purl":"pkg:pypi/jinja2","source":"GHSA-h75v-3vvj-5mfj"},{"ecosystem":"PyPI","fixed":["3.1.4"],"introduced":["0"],"last_affected":[],"package":"jinja2","purl":"pkg:pypi/jinja2","source":"PYSEC-2026-1474"},{"ecosystem":"AlmaLinux:8","fixed":["2.10.1-5.el8_10"],"introduced":["0"],"last_affected":[],"package":"python3-jinja2","purl":"pkg:rpm/almalinux/python3-jinja2","source":"ALSA-2024:4231"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-aliyun","purl":"pkg:rpm/almalinux/fence-agents-aliyun","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-all","purl":"pkg:rpm/almalinux/fence-agents-all","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-amt-ws","purl":"pkg:rpm/almalinux/fence-agents-amt-ws","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-apc","purl":"pkg:rpm/almalinux/fence-agents-apc","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-apc-snmp","purl":"pkg:rpm/almalinux/fence-agents-apc-snmp","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-aws","purl":"pkg:rpm/almalinux/fence-agents-aws","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-azure-arm","purl":"pkg:rpm/almalinux/fence-agents-azure-arm","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-bladecenter","purl":"pkg:rpm/almalinux/fence-agents-bladecenter","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-brocade","purl":"pkg:rpm/almalinux/fence-agents-brocade","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-cisco-mds","purl":"pkg:rpm/almalinux/fence-agents-cisco-mds","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-cisco-ucs","purl":"pkg:rpm/almalinux/fence-agents-cisco-ucs","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-common","purl":"pkg:rpm/almalinux/fence-agents-common","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-compute","purl":"pkg:rpm/almalinux/fence-agents-compute","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-drac5","purl":"pkg:rpm/almalinux/fence-agents-drac5","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-eaton-snmp","purl":"pkg:rpm/almalinux/fence-agents-eaton-snmp","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-emerson","purl":"pkg:rpm/almalinux/fence-agents-emerson","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-eps","purl":"pkg:rpm/almalinux/fence-agents-eps","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-gce","purl":"pkg:rpm/almalinux/fence-agents-gce","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-heuristics-ping","purl":"pkg:rpm/almalinux/fence-agents-heuristics-ping","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-hpblade","purl":"pkg:rpm/almalinux/fence-agents-hpblade","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-ibm-powervs","purl":"pkg:rpm/almalinux/fence-agents-ibm-powervs","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-ibm-vpc","purl":"pkg:rpm/almalinux/fence-agents-ibm-vpc","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-ibmblade","purl":"pkg:rpm/almalinux/fence-agents-ibmblade","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-ifmib","purl":"pkg:rpm/almalinux/fence-agents-ifmib","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-ilo-moonshot","purl":"pkg:rpm/almalinux/fence-agents-ilo-moonshot","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-ilo-mp","purl":"pkg:rpm/almalinux/fence-agents-ilo-mp","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-ilo-ssh","purl":"pkg:rpm/almalinux/fence-agents-ilo-ssh","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-ilo2","purl":"pkg:rpm/almalinux/fence-agents-ilo2","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-intelmodular","purl":"pkg:rpm/almalinux/fence-agents-intelmodular","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-ipdu","purl":"pkg:rpm/almalinux/fence-agents-ipdu","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-ipmilan","purl":"pkg:rpm/almalinux/fence-agents-ipmilan","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-kdump","purl":"pkg:rpm/almalinux/fence-agents-kdump","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-kubevirt","purl":"pkg:rpm/almalinux/fence-agents-kubevirt","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-lpar","purl":"pkg:rpm/almalinux/fence-agents-lpar","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-mpath","purl":"pkg:rpm/almalinux/fence-agents-mpath","source":"ALSA-2024:3820"},{"ecosystem":"AlmaLinux:9","fixed":["4.10.0-62.el9_4.3"],"introduced":["0"],"last_affected":[],"package":"fence-agents-openstack","purl":"pkg:rpm/almalinux/fence-agents-openstack","source":"ALSA-2024:3820"}],"prev":{"headline":"Degraded secret zeroization capabilities in vodozemac","id":"CVE-2024-34063"},"products":["jinja"],"published":"2024-05-06","related":[{"cvss_score":9.8,"headline":"PHP-CGI OS Command Injection","id":"CVE-2024-4577","kev_date_added":"2024-06-12","published":"2024-06-09"},{"cvss_score":9.8,"headline":"Grafana Authentication Bypass","id":"CVE-2021-39226","kev_date_added":"2022-08-25","published":"2021-10-05"},{"cvss_score":9.8,"headline":"VMware ESXi and Horizon DaaS OpenSLP Heap-Based Buffer Overflow","id":"CVE-2019-5544","kev_date_added":"2021-11-03","published":"2019-12-06"},{"cvss_score":9.6,"headline":"Google Chromium V8 Type Confusion","id":"CVE-2024-4947","kev_date_added":"2024-05-20","published":"2024-05-15"},{"cvss_score":9.6,"headline":"Google Chromium Visuals Use-After-Free","id":"CVE-2024-4671","kev_date_added":"2024-05-13","published":"2024-05-09"},{"cvss_score":9.6,"headline":"Google Chromium Mojo Insufficient Data Validation","id":"CVE-2022-3075","kev_date_added":"2022-09-08","published":"2022-09-26"},{"cvss_score":9.6,"headline":"Google Chromium Indexed DB API Use-After-Free","id":"CVE-2021-30633","kev_date_added":"2021-11-03","published":"2021-10-08"}],"sources":[{"class":"attribution","licence":"MIT","name":"AlmaLinux","prefix":"ALSA"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-11-03","vendors":["pallets"]},"summary":"Attackers can inject HTML attributes via user-controlled keys in the xmlattr filter, leading to XSS in applications rendering this input.","url":"https://insights.sbomify.com/CVE-2024-34064/"}