Medium severity · published May 26, 2026
CVE-2026-44897
Mistune Heading ID Attribute Injection XSS
6.1
CVSS
0.2%
EPSS
No
On KEV
Description
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
Required
Confidentiality
Low
Integrity
Low
Availability
None
Scope
Changed
Exploitation
Is it being used?
Exploit prediction (EPSS)0.2% · higher than 14% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
MI
mistune · lepture
< 3.2.1 · source: vendor, NVD
Affected product
MI
mistune
lepture
More from mistune
8.6
CVE-2026-115353
Mistune before 3.3.0 Path Traversal via include Directive
7.5
CVE-2026-115355
Mistune before 3.3.0 Path Traversal and XSS via Include Directive
7.5
CVE-2026-115352
Mistune before 3.3.0 Quadratic-Time DoS via Unmatched Brackets in Inline Parser
7.5
CVE-2026-115349
Mistune 3.0.0 before 3.3.0 Denial of Service via Nested Bracket Parsing
7.5
CVE-2026-115348
Mistune before 3.3.0 Quadratic-Time DoS via parse_link_text