Vulnerability · Published May 26, 2026 · Assigned by GitHub_M

CVE-2026-44897Mistune Heading ID Attribute Injection XSS

Medium 6.1

In plain English

A medium-severity cross-site scripting in mistune from lepture. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 14% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.1Medium
Exploit odds (30 days)0.2%top 86.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12mistuneno fix listedDEBIAN-CVE-2026-44897
Debian:13mistuneno fix listedDEBIAN-CVE-2026-44897
Debian:14mistuneno fix listedDEBIAN-CVE-2026-44897
PyPImistune3.2.1GHSA-v87v-83h2-53w7
PyPImistune3.2.1PYSEC-2026-2207
Ubuntu:22.04:LTSmistuneno fix listedUBUNTU-CVE-2026-44897
Ubuntu:24.04:LTSmistuneno fix listedUBUNTU-CVE-2026-44897
Ubuntu:25.10mistuneno fix listedUBUNTU-CVE-2026-44897
Ubuntu:26.04:LTSmistuneno fix listedUBUNTU-CVE-2026-44897
Ubuntu:26.10mistuneno fix listedUBUNTU-CVE-2026-44897
Ubuntu:22.04:LTSmistune0no fix listedUBUNTU-CVE-2026-44897
Ubuntu:24.04:LTSmistune0no fix listedUBUNTU-CVE-2026-44897
Ubuntu:25.10mistune0no fix listedUBUNTU-CVE-2026-44897
Ubuntu:26.04:LTSmistune0no fix listedUBUNTU-CVE-2026-44897
Ubuntu:26.10mistune0no fix listedUBUNTU-CVE-2026-44897

Affected products (as reported)

VendorProductVersions
lepture mistune < 3.2.1

Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

References