Name | CVE-2024-34064 |
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. |
Source | CVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
Debian Bugs | 1070712 |
The table below lists information on source packages.
Source Package | Release | Version | Status |
---|---|---|---|
jinja2 (PTS) | jessie, jessie (lts) | 2.7.3-1+deb8u1 | vulnerable |
stretch (lts), stretch | 2.8-1+deb9u1 | vulnerable | |
buster (security), buster, buster (lts) | 2.10-2+deb10u1 | vulnerable | |
bullseye | 2.11.3-1 | vulnerable | |
bookworm | 3.1.2-1 | vulnerable | |
sid, trixie | 3.1.3-1 | vulnerable |
The information below is based on the following data on fixed versions.
Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
---|---|---|---|---|---|---|
jinja2 | source | (unstable) | (unfixed) | 1070712 |
[bookworm] - jinja2 <no-dsa> (Minor issue)
[bullseye] - jinja2 <no-dsa> (Minor issue)
[buster] - jinja2 <postponed> (Minor issue)
https://github.com/pallets/jinja/security/advisories/GHSA-h75v-3vvj-5mfj
Fixed by: https://github.com/pallets/jinja/commit/d655030770081e2dfe46f90e27620472a502289d (3.1.4)
[stretch] - jinja2 <postponed> (Minor issue)
[jessie] - jinja2 <postponed> (Minor issue)