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) |
References | DLA-3988-1 |
Debian Bugs | 1070712 |
The table below lists information on source packages.
Source Package | Release | Version | Status |
---|---|---|---|
jinja2 (PTS) | bullseye | 2.11.3-1 | vulnerable |
bullseye (security) | 2.11.3-1+deb11u2 | fixed | |
bookworm | 3.1.2-1 | vulnerable | |
sid, trixie | 3.1.3-1.1 | fixed |
The information below is based on the following data on fixed versions.
Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
---|---|---|---|---|---|---|
jinja2 | source | bullseye | 2.11.3-1+deb11u1 | DLA-3988-1 | ||
jinja2 | source | (unstable) | 3.1.3-1.1 | 1070712 |
[bookworm] - 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)