
CVE catalog
CVE-2024-34064
Jinja2 vulnerability
- Severity
- Medium · CVSS 6.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 0.98% · Oct 25, 2026
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.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | jinja2 | sid | 3.1.6-4 | fixed |
| Debian | jinja2 | forky | 3.1.6-4 | fixed |
| Debian | jinja2 | trixie | 3.1.6-1 | fixed |
| Debian | jinja2 | bookworm | 3.1.2-1+deb12u3 | fixed |
| Ubuntu | jinja2 | noble | 3.1.2-1ubuntu1.1 | fixed |
| Ubuntu | python-jinja2-doc | noble | 3.1.2-1ubuntu1.1 | fixed |
| Ubuntu | python3-jinja2 | noble | 3.1.2-1ubuntu1.1 | fixed |
| Alpine | py3-jinja2 | 3.17 | 3.1.4-r0 | fixed |
| Alpine | py3-jinja2 | 3.18 | 3.1.4-r0 | fixed |
| Alpine | py3-jinja2 | 3.19 | 3.1.4-r0 | fixed |
| Alpine | py3-jinja2 | 3.20 | 3.1.4-r0 | fixed |
| Alpine | py3-jinja2 | 3.21 | 3.1.4-r0 | fixed |
| Alpine | py3-jinja2 | 3.22 | 3.1.4-r0 | fixed |
| Alpine | py3-jinja2 | 3.23 | 3.1.4-r0 | fixed |
| Alpine | py3-jinja2 | 3.24 | 3.1.4-r0 | fixed |
| Ubuntu | jinja2 | pro | 2.9.6-1 | vulnerable |
| Ubuntu | jinja2 | pro | 2.10-1 | vulnerable |
| Ubuntu | jinja2 | pro | 2.10-1ubuntu0.18.04.1 | vulnerable |
| Ubuntu | jinja2 | pro | 2.10-1ubuntu0.18.04.1+esm1 | vulnerable |
| Ubuntu | jinja2 | pro | 2.10-1ubuntu0.18.04.1+esm2 | fixed |
| Ubuntu | jinja2 | 20.04 | 2.10-2ubuntu1 | vulnerable |
| Ubuntu | jinja2 | 20.04 | 2.10-2ubuntu2 | vulnerable |
| Ubuntu | jinja2 | 20.04 | 2.10.1-1ubuntu1 | vulnerable |
| Ubuntu | jinja2 | 20.04 | 2.10.1-2 | vulnerable |
| Ubuntu | jinja2 | 20.04 | 2.10.1-2ubuntu0.2 | vulnerable |
| Ubuntu | jinja2 | 20.04 | 2.10.1-2ubuntu0.3 | fixed |
| Ubuntu | jinja2 | 22.04 | 2.11.3-1 | vulnerable |
| Ubuntu | jinja2 | 22.04 | 3.0.1-2 | vulnerable |
| Ubuntu | jinja2 | 22.04 | 3.0.3-1 | vulnerable |
| Ubuntu | jinja2 | 22.04 | 3.0.3-1ubuntu0.1 | vulnerable |
| Ubuntu | jinja2 | 22.04 | 3.0.3-1ubuntu0.2 | fixed |
| Ubuntu | jinja2 | 24.04 | 3.1.2-1 | vulnerable |
| Ubuntu | jinja2 | 24.04 | 3.1.2-1ubuntu1 | vulnerable |
| Ubuntu | jinja2 | 24.04 | 3.1.2-1ubuntu1.1 | fixed |
| Suse | python-Jinja2 | manager client tools 12 | 2.8-19.26.1 | fixed |
| Suse | python-Jinja2 | linux enterprise module for advanced systems management 12 | 2.8-19.26.1 | fixed |
| Suse | python-Jinja2 | linux enterprise module for public cloud 12 | 2.8-19.26.1 | fixed |
| Ubuntu | jinja2 | pro | 2.9.6-1 | vulnerable |
| Ubuntu | jinja2 | pro | 2.10-1 | vulnerable |
| Ubuntu | jinja2 | pro | 2.10-1ubuntu0.18.04.1 | vulnerable |
| Ubuntu | jinja2 | pro | 2.10-1ubuntu0.18.04.1+esm1 | vulnerable |
| Ubuntu | jinja2 | pro | 2.10-1ubuntu0.18.04.1+esm2 | fixed |
| Ubuntu | jinja2 | 20.04 | 2.10-2ubuntu1 | vulnerable |
| Ubuntu | jinja2 | 20.04 | 2.10-2ubuntu2 | vulnerable |
| Ubuntu | jinja2 | 20.04 | 2.10.1-1ubuntu1 | vulnerable |
| Ubuntu | jinja2 | 20.04 | 2.10.1-2 | vulnerable |
| Ubuntu | jinja2 | 20.04 | 2.10.1-2ubuntu0.2 | vulnerable |
| Ubuntu | jinja2 | 20.04 | 2.10.1-2ubuntu0.3 | fixed |
| Ubuntu | jinja2 | 22.04 | 2.11.3-1 | vulnerable |
| Ubuntu | jinja2 | 22.04 | 3.0.1-2 | vulnerable |
| Ubuntu | jinja2 | 22.04 | 3.0.3-1 | vulnerable |
| Ubuntu | jinja2 | 22.04 | 3.0.3-1ubuntu0.1 | vulnerable |
| Ubuntu | jinja2 | 22.04 | 3.0.3-1ubuntu0.2 | fixed |
| Ubuntu | jinja2 | 24.04 | 3.1.2-1 | vulnerable |
| Ubuntu | jinja2 | 24.04 | 3.1.2-1ubuntu1 | vulnerable |
| Ubuntu | jinja2 | 24.04 | 3.1.2-1ubuntu1.1 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | jinja2 | source | sid | 3.1.3-1.1 | not yet assigned | Not reported | [1070712] |
| Debian | jinja2 | source | forky | 3.1.3-1.1 | not yet assigned | Not reported | [1070712] |
| Debian | jinja2 | source | trixie | 3.1.3-1.1 | not yet assigned | Not reported | [1070712] |
| Debian | jinja2 | source | bookworm | 3.1.2-1+deb12u1 | not yet assigned | Not reported | [1070712] |
| Ubuntu | jinja2 | deb | noble | 3.1.2-1ubuntu1.1 | Not reported | Not reported | Not reported |
| Ubuntu | python-jinja2-doc | deb | noble | 3.1.2-1ubuntu1.1 | Not reported | Not reported | Not reported |
| Ubuntu | python3-jinja2 | deb | noble | 3.1.2-1ubuntu1.1 | Not reported | Not reported | Not reported |
| Alpine | py3-jinja2 | apk | 3.17 | 3.1.4-r0 | Not reported | ALPINE-CVE-2024-34064 | Not reported |
| Alpine | py3-jinja2 | apk | 3.18 | 3.1.4-r0 | Not reported | ALPINE-CVE-2024-34064 | Not reported |
| Alpine | py3-jinja2 | apk | 3.19 | 3.1.4-r0 | Not reported | ALPINE-CVE-2024-34064 | Not reported |
| Alpine | py3-jinja2 | apk | 3.20 | 3.1.4-r0 | Not reported | ALPINE-CVE-2024-34064 | Not reported |
| Alpine | py3-jinja2 | apk | 3.21 | 3.1.4-r0 | Not reported | ALPINE-CVE-2024-34064 | Not reported |
| Alpine | py3-jinja2 | apk | 3.22 | 3.1.4-r0 | Not reported | ALPINE-CVE-2024-34064 | Not reported |
| Alpine | py3-jinja2 | apk | 3.23 | 3.1.4-r0 | Not reported | ALPINE-CVE-2024-34064 | Not reported |
| Alpine | py3-jinja2 | apk | 3.24 | 3.1.4-r0 | Not reported | ALPINE-CVE-2024-34064 | Not reported |
| Ubuntu | jinja2 | deb | pro | 2.10-1ubuntu0.18.04.1+esm2 | Not reported | USN-6787-1 | Not reported |
| Ubuntu | jinja2 | deb | 20.04 | 2.10.1-2ubuntu0.3 | Not reported | USN-6787-1 | Not reported |
| Ubuntu | jinja2 | deb | 22.04 | 3.0.3-1ubuntu0.2 | Not reported | USN-6787-1 | Not reported |
| Ubuntu | jinja2 | deb | 24.04 | 3.1.2-1ubuntu1.1 | Not reported | USN-6787-1 | Not reported |
| Suse | python-Jinja2 | rpm | manager client tools 12 | 2.8-19.26.1 | Not reported | SUSE-SU-2024:1948-1 | Not reported |
| Suse | python-Jinja2 | rpm | linux enterprise module for advanced systems management 12 | 2.8-19.26.1 | Not reported | SUSE-SU-2024:1948-1 | Not reported |
| Suse | python-Jinja2 | rpm | linux enterprise module for public cloud 12 | 2.8-19.26.1 | Not reported | SUSE-SU-2024:1948-1 | Not reported |
| Ubuntu | jinja2 | deb | pro | 2.10-1ubuntu0.18.04.1+esm2 | Not reported | UBUNTU-CVE-2024-34064 | Not reported |
| Ubuntu | jinja2 | deb | 20.04 | 2.10.1-2ubuntu0.3 | Not reported | UBUNTU-CVE-2024-34064 | Not reported |
| Ubuntu | jinja2 | deb | 22.04 | 3.0.3-1ubuntu0.2 | Not reported | UBUNTU-CVE-2024-34064 | Not reported |
| Ubuntu | jinja2 | deb | 24.04 | 3.1.2-1ubuntu1.1 | Not reported | UBUNTU-CVE-2024-34064 | Not reported |
OpenFactory catalog packages
Matching against OpenFactory catalog package versions is in progress.
References
- [https://ftp.suse.com/pub/projects/security/csaf/rhsa-2024_4231.json]
- [https://osv.dev/vulnerability/ALPINE-CVE-2024-34064]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2024-34064]
- [https://osv.dev/vulnerability/SUSE-SU-2024:1948-1]
- [https://osv.dev/vulnerability/UBUNTU-CVE-2024-34064]
- [https://osv.dev/vulnerability/USN-6787-1]
- [https://security-tracker.debian.org/tracker/CVE-2024-34064]
- [https://security.access.redhat.com/data/csaf/v2/vex/2024/cve-2024-34064.json]
- [https://ubuntu.com/security/notices/USN-6787-1]
- [https://wid.cert-bund.de/.well-known/csaf/white/2024/wid-sec-w-2024-1913.json]
[CERT-Bund public advisories] · [Debian Security Tracker] · [FIRST EPSS] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX] · [SUSE security advisories and VEX] · [Ubuntu Security Notices (USN)]