ADVISORIES

Red Hat VEX

RHVEX-CVE-2024-22195

jinja2: HTML attribute injection when passing user input as keys to xmlattr filter

Moderate No fix available CVE-2024-22195

Details

A cross-site scripting (XSS) flaw was found in Jinja2 due to the xmlattr filter allowing keys with spaces, contrary to XML/HTML attribute standards. If an application accepts user-input keys and renders them for other users, attackers can inject additional attributes, potentially leading to XSS. This misuse of the xmlattr filter enables the injection of arbitrary HTML attributes, bypassing auto-escaping and potentially circumventing attribute validation checks.

Affected packages

EcosystemPackageAffected versions
Red Hat:enterprise_linux:6python-jinja2
All versions, no fix (out of support scope)
Red Hat:enterprise_linux:7python-jinja2
All versions, no fix (out of support scope)

References