{"id":"CVE-2026-44898","published":"2026-05-26T20:41:53Z","modified":"2026-05-27T17:57:38Z","title":"Mistune TOC Anchor 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, render_toc_ul() builds a <ul> table-of-contents tree from a list of (level, id, text) tuples. Both the id value (used as href=\"#<id>\") and the text value (used as the visible link label) are inserted into <a> tags via a plain Python format string — with no HTML escaping applied to either value. When heading IDs are derived from user-supplied heading text (the standard use-case for readable slug anchors), an attacker can craft a heading whose text breaks out of the href=\"#...\" attribute context, injecting arbitrary HTML tags including <script> blocks directly into the rendered TOC. 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.00228,"percentile":0.13848,"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-6269-cqxg-mhhv","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/lepture/mistune/releases/tag/v3.2.1","tags":["x_refsource_MISC"]}],"priority":{"score":7.0,"factors":[{"name":"EPSS percentile","points":2.77},{"name":"CVSS severity","points":4.27}]},"vendorSlug":"lepture","affectedVersions":[{"vendor":"lepture","product":"mistune","versions":["< 3.2.1"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-05-27T17:57:34.250055Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"mistune","vulnerableRanges":[">=3.2.0, <3.2.1","<3.2.1"],"patched":["3.2.1"],"from":["GHSA-6269-cqxg-mhhv","PYSEC-2026-2208"],"provenance":"source"}],"summary":{"text":"Mistune, a Python Markdown parser, has a cross-site scripting flaw in its table-of-contents renderer (render_toc_ul()), where heading IDs and heading text are inserted into anchor tags without HTML escaping. Exploitation requires a user to interact with the crafted content, but no authentication or network access beyond supplying the Markdown input, and an attacker can inject arbitrary HTML and script into the rendered TOC when heading IDs are derived from user-supplied heading text.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:15:15Z"},"euvd":{"id":"EUVD-2026-31995","exploited":false,"provenance":"source"}}