CVE-2026-44898

6.1 MEDIUM
Published: May 26, 2026 Modified: May 28, 2026
View on NVD

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.

AI Explanation

Get an AI-powered plain-language explanation of this vulnerability and remediation steps.

Login to generate AI explanation

CVSS v3.x Details

0.0 Low Medium High Critical 10.0
Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

References to Advisories, Solutions, and Tools

Patch Vendor Advisory Exploit Third Party Advisory
https://github.com/lepture/mistune/releases/tag/v3.2.1
Source: security-advisories@github.com
Product Release Notes
https://github.com/lepture/mistune/security/advisories/GHSA-6269-cqxg-mhhv
Source: security-advisories@github.com
Exploit Vendor Advisory
https://github.com/lepture/mistune/security/advisories/GHSA-6269-cqxg-mhhv
Source: 134c704f-9b21-4f2e-91b3-4a467353bcc0
Exploit Vendor Advisory

3 reference(s) from NVD

Quick Stats

CVSS v3 Score
6.1 / 10.0
EPSS (Exploit Probability)
0.2%
10th percentile
Exploitation Status
Not in CISA KEV

Weaknesses (CWE)

Affected Vendors

mistune_project