{"id":"CVE-2026-44897","published":"2026-05-26T20:40:42Z","modified":"2026-06-01T17:09:12Z","title":"Mistune Heading ID Attribute Injection XSS","vendor":"lepture","product":"mistune","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00271,"percentile":0.12326,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/lepture/mistune/security/advisories/GHSA-v87v-83h2-53w7","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/lepture/mistune/releases/tag/v3.2.1","tags":["x_refsource_MISC"]}],"priority":{"score":6.7,"factors":[{"name":"EPSS percentile","points":2.47},{"name":"CVSS severity","points":4.27}]},"vendorSlug":"lepture","affectedVersions":[{"vendor":"lepture","product":"mistune","versions":["< 3.2.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-06-01T17:04:08.778886Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"mistune","vulnerableRanges":["<3.2.1"],"patched":["3.2.1"],"from":["GHSA-v87v-83h2-53w7","PYSEC-2026-2207"],"provenance":"source"}],"summary":{"text":"The Mistune Python Markdown parser, prior to version 3.2.1, fails to sanitise the id attribute of heading elements in its HTML renderer, so a double-quote character in that value breaks out of the attribute and allows injection of additional HTML attributes into the heading tag. An attacker can exploit this by supplying crafted Markdown that a victim must view or interact with, such as by clicking a link, and no authentication or network access is required beyond delivering that content.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:15:15Z"},"euvd":{"id":"EUVD-2026-31994","exploited":false,"provenance":"source"}}