Bugzilla – Bug 1223980
VUL-0: CVE-2024-34064: python-Jinja2: HTML attribute injection when passing user input as keys to xmlattr filter
Last modified: 2024-07-12 16:30:54 UTC
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. References: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2024-34064 https://www.cve.org/CVERecord?id=CVE-2024-34064 https://github.com/pallets/jinja/commit/0668239dc6b44ef38e7a6c9f91f312fd4ca581cb https://github.com/pallets/jinja/security/advisories/GHSA-h75v-3vvj-5mfj
This is an autogenerated message for OBS integration: This bug (1223980) was mentioned in https://build.opensuse.org/request/show/1172259 Factory / python-Jinja2
Request with a fix created for all affected codestreams.
SUSE-SU-2024:1948-1: An update that solves one vulnerability can now be installed. Category: security (moderate) Bug References: 1223980 CVE References: CVE-2024-34064 Maintenance Incident: [SUSE:Maintenance:33879](https://smelt.suse.de/incident/33879/) Sources used: SUSE Manager Client Tools for SLE 12 (src): python-Jinja2-2.8-19.26.1 Advanced Systems Management Module 12 (src): python-Jinja2-2.8-19.26.1 Public Cloud Module 12 (src): python-Jinja2-2.8-19.26.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
SUSE-SU-2024:1863-2: An update that solves two vulnerabilities can now be installed. Category: security (moderate) Bug References: 1218722, 1223980 CVE References: CVE-2024-22195, CVE-2024-34064 Maintenance Incident: [SUSE:Maintenance:33877](https://smelt.suse.de/incident/33877/) Sources used: SUSE Linux Enterprise Micro 5.5 (src): python-Jinja2-2.10.1-150000.3.13.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.