Skip to main content
← All vulnerabilities
CVE-2024-22195GHSA-H5C8-RQWP-CP95PYSEC-2026-1473

Jinja vulnerable to Cross-Site Scripting (XSS)

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 3.1.3
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • pallets jinja

    fixed in 3.1.3

  • jinja2PyPI

    fixed in 3.1.3

References 6

GitHub · pallets/jinja

lists.fedoraproject.org

lists.debian.org