Skip to main content
← All vulnerabilities
CVE-2026-44897PYSEC-2026-2207GHSA-V87V-83H2-53W7

Mistune Heading ID Attribute Injection XSS

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: no
  • Technical impact: partial

Summary

Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.2.1, HTMLRenderer.heading() builds the opening <hN> tag by string-concatenating the id attribute value directly into the HTML — with no call to escape(), safe_entity(), or any other sanitisation function. A double-quote character " in the id value terminates the attribute, allowing an attacker to inject arbitrary additional attributes (event handlers, src=, href=, etc.) into the heading element. This vulnerability is fixed in 3.2.1.

Timeline

  1. CVE published
  2. CISA SSVC assessment

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

  3. Record last updated

Affected versions

  • lepture mistune

    fixed in 3.2.1

  • mistunePyPI

    fixed in 3.2.1

References 2

GitHub · lepture/mistune