Skip to main content
← All vulnerabilities
CVE-2026-44896PYSEC-2026-168GHSA-58CW-G322-P94V

Mistune: XSS via unescaped figclass/figwidth in Figure directive

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

Summary

Mistune is a Python Markdown parser with renderers and plugins. In 3.2.0 and earlier, in src/mistune/directives/image.py, the render_figure() function concatenates figclass and figwidth options directly into HTML attributes without escaping. This allows attribute injection and XSS even when HTMLRenderer(escape=True) is used, because these values bypass the inline renderer. Version 3.2.1 contains a patch.

Timeline

  1. CVE published
  2. CISA SSVC assessment

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

  3. Record last updated

Affected versions

  • lepture mistune

    fixed in 3.2.1

  • mistunePyPI

    fixed in 3.2.1

  • mistunePyPI

    fixed in 3.2.1

References 2

GitHub · lepture/mistune