CVE-2026-59930

Mistune toc / TableOfContents directive: heading IDs use predictable `toc_N` numbering with no slugification, allowing collision with attacker-controlled `id="toc_N"` content

MEDIUM
4.3
CVSS Score
Published: July 8, 2026 at 04:13 PM UTC
Updated: October 25, 2026 at 05:10 PM UTC
2 products affected across 2 vendorsMistuneProject Mistune

Using mistune by lepture?

Get instant alerts when new vulnerabilities affect mistune - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM4.3
Exploit prediction
EPSS 0.2%
SSVC
PoC

Description

Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.3.0, the toc plugin and TableOfContents directive generate heading IDs as predictable toc_N values without slugifying the heading text, allowing attacker-controlled id="toc_N" content to collide with generated anchors and redirect same-page navigation, CSS selectors, or JavaScript handlers. This issue is fixed in version 3.3.0.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 3.3.0
Affected range stops below 3.3.0, so it looks safe — our inference, not a vendor statement
v < 3.3.0
Affected range stops below 3.3.0, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (3)

x_refsource_CONFIRMExploitThird Party Advisory
Source: cverecord
https://github.com/lepture/mistune/security/advisories/GHSA-2hm2-hc3v-44h9
x_refsource_MISCRelease Notes
Source: cverecord
https://github.com/lepture/mistune/releases/tag/v3.3.0

SSVC — Action Prioritization

SSVCPoCNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

4.3MEDIUMGitHub_M
Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
NONE
Integrity
LOW
Availability
NONE
Vector?

Quick Info

StatusANALYZED
CWE
CWE-345CWE-1284

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card