CVE Catalog

CVE-2024-22195

MediumCVSS 5.4
Published: Updated: Translated: NVD NIST

Summary

Jinja is an extensible templating engine. It is possible to inject arbitrary HTML attributes into the rendered HTML template via the xmlattr filter, bypassing the auto-escaping mechanism and potentially leading to Cross-Site Scripting (XSS). It may also be possible to bypass blacklist-based attribute validation.

Risk Assessment

Confidentiality and integrity breach — an attacker can execute malicious script in the user's browser, hijack session or data. This may affect users of the application using Jinja.

Recommendation

Update the Jinja library to a patched version. Avoid using the xmlattr filter with untrusted input.

Other vulnerabilities in Jinja

Original NVD description (English source)

Jinja is an extensible templating engine. Special placeholders in the template allow writing code similar to Python syntax. It is possible to inject arbitrary HTML attributes into the rendered HTML template, potentially leading to Cross-Site Scripting (XSS). The Jinja `xmlattr` filter can be abused to inject arbitrary HTML attribute keys and values, bypassing the auto escaping mechanism and potentially leading to XSS. It may also be possible to bypass attribute validation checks if they are blacklist-based.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS