First published: Mon May 06 2024(Updated: )
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.
Credit: security-advisories@github.com security-advisories@github.com
Affected Software | Affected Version | How to fix |
---|---|---|
ubuntu/jinja2 | <2.10-1ubuntu0.18.04.1+ | 2.10-1ubuntu0.18.04.1+ |
ubuntu/jinja2 | <2.10.1-2ubuntu0.3 | 2.10.1-2ubuntu0.3 |
ubuntu/jinja2 | <3.0.3-1ubuntu0.2 | 3.0.3-1ubuntu0.2 |
ubuntu/jinja2 | <3.1.2-1ubuntu0.23.10.2 | 3.1.2-1ubuntu0.23.10.2 |
ubuntu/jinja2 | <3.1.2-1ubuntu1.1 | 3.1.2-1ubuntu1.1 |
ubuntu/jinja2 | <2.7.2-2ubuntu0.1~ | 2.7.2-2ubuntu0.1~ |
ubuntu/jinja2 | <3.1.4 | 3.1.4 |
ubuntu/jinja2 | <2.8-1ubuntu0.1+ | 2.8-1ubuntu0.1+ |
pip/Jinja2 | <3.1.4 | 3.1.4 |
debian/jinja2 | <=2.11.3-1<=3.1.2-1<=3.1.3-1 | |
IBM Cloud Pak for Security | <=1.10.0.0 - 1.10.11.0 | |
IBM QRadar Suite Software | <=1.10.12.0 - 1.10.23.0 | |
redhat/jinja2 | <3.1.4 | 3.1.4 |
F5 Traffix SDC | =5.1.0 | 5.2.0 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.