Live threats

All CVEs / Mistune Project

CVE-2026-44898Mistune Project Mistune

Medium 6.1 No auth needed

Priority
52
CVSS 3.1
6.1
EPSS
—
Auth required
No
Published
May 26, 2026
Updated
Jul 24, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-79
SSVC (CISA)
Exploitation: proof of concept · Automatable: no · Technical impact: partial
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Mistune.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI mistune ≥ 3.2.0 < 3.2.1 3.2.1 pip install "mistune>=3.2.1"
PyPI mistune < 3.2.1 3.2.1 pip install "mistune>=3.2.1"

Per OSV / GitHub Advisories (GHSA-6269-cqxg-mhhv, PYSEC-2026-2208). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
mistune_projectmistune< 3.2.1

Official advisories

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.