CVE-2026-59930: CWE-345: Insufficient Verification of Data Authenticity in lepture mistune
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.
AI Analysis
Technical Summary
Mistune versions before 3.3.0 have a vulnerability where the toc plugin and TableOfContents directive generate heading IDs as predictable toc_N values without slugifying the heading text. This can lead to collisions between attacker-controlled id="toc_N" content and generated anchors, which may redirect same-page navigation, CSS selectors, or JavaScript handlers. The vulnerability is classified under CWE-345 (Insufficient Verification of Data Authenticity) and CWE-1284. The issue is resolved in mistune 3.3.0.
Potential Impact
The vulnerability does not affect confidentiality or availability but can lead to integrity issues by allowing attacker-controlled IDs to interfere with page navigation, CSS, or JavaScript behavior. This could cause unexpected redirection or manipulation of page elements relying on these anchors.
Mitigation Recommendations
A fix is available in mistune version 3.3.0. Users should upgrade to version 3.3.0 or later to remediate this vulnerability. No additional vendor advisory or temporary mitigations are provided.
CVE-2026-59930: CWE-345: Insufficient Verification of Data Authenticity in lepture mistune
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.
CVSS v3.1
Score 4.3medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Mistune versions before 3.3.0 have a vulnerability where the toc plugin and TableOfContents directive generate heading IDs as predictable toc_N values without slugifying the heading text. This can lead to collisions between attacker-controlled id="toc_N" content and generated anchors, which may redirect same-page navigation, CSS selectors, or JavaScript handlers. The vulnerability is classified under CWE-345 (Insufficient Verification of Data Authenticity) and CWE-1284. The issue is resolved in mistune 3.3.0.
Potential Impact
The vulnerability does not affect confidentiality or availability but can lead to integrity issues by allowing attacker-controlled IDs to interfere with page navigation, CSS, or JavaScript behavior. This could cause unexpected redirection or manipulation of page elements relying on these anchors.
Mitigation Recommendations
A fix is available in mistune version 3.3.0. Users should upgrade to version 3.3.0 or later to remediate this vulnerability. No additional vendor advisory or temporary mitigations are provided.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-07-07T18:20:06.126Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a4e7ad5c9d9e3dbe36a7e02
Added to database: 07/08/2026, 16:29:09 UTC
Last enriched: 07/16/2026, 10:14:21 UTC
Last updated: 08/22/2026, 10:52:10 UTC
Views: 92
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.