CVE-2026-44898 Details
Description
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.
A cross-site scripting vulnerability has been identified in the Mistune Markdown parser, prior to version 3.2.1. The issue arises in the `render_toc_ul()` function, which creates a `<ul>` table-of-contents from tuples of heading levels, IDs, and text. The vulnerability exists because the ID and text values are inserted into `<a>` tags without proper HTML escaping. This flaw allows an attacker to craft a heading that injects arbitrary HTML, including `<script>` tags, into the rendered table-of-contents. The vulnerability is particularly concerning when heading IDs are generated from user-supplied text, as this can easily be manipulated to break out of the attribute context and execute scripts.
Users should upgrade to Mistune version 3.2.1 or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed May 27, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/lepture/mistune/security/advisories/GHSA-6269-cqxg-mhhv | CISA-ADP | ExploitVendor Advisory |
| https://github.com/lepture/mistune/releases/tag/v3.2.1 | [email protected] | ProductRelease Notes |
| https://github.com/lepture/mistune/security/advisories/GHSA-6269-cqxg-mhhv | [email protected] | ExploitVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| mistune project mistune | < 3.2.1 |
CPE
Remediation
| |
Change History
7 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 24, 2026 | CVE Translated | [email protected] |
| Jul 23, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 17, 2026 | CVE Modified | [email protected] |
| May 28, 2026 | Initial Analysis | [email protected] |
| May 27, 2026 | CVE Modified | CISA-ADP |
| May 26, 2026 | New CVE Received | [email protected] |