CVE-2026-44898: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in lepture mistune
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 Analysis
Technical Summary
Mistune, a Python Markdown parser, had an XSS vulnerability (CWE-79) in versions before 3.2.1. The render_toc_ul() function builds a <ul> table-of-contents from tuples containing heading level, id, and text. The id and text values are inserted into <a> tags using plain Python string formatting without HTML escaping. When heading IDs are generated from user input, an attacker can craft headings that break out of the href attribute context and inject arbitrary HTML or script code into the rendered TOC. This vulnerability allows injection of malicious scripts in the generated HTML. The issue is resolved in version 3.2.1.
Potential Impact
Exploitation of this vulnerability can lead to injection of arbitrary HTML and script code in the rendered table-of-contents, potentially enabling cross-site scripting attacks. The CVSS score of 6.1 indicates a medium severity with network attack vector, low attack complexity, no privileges required, user interaction required, and partial impact on confidentiality and integrity but no impact on availability. There are no known exploits in the wild at this time.
Mitigation Recommendations
This vulnerability is fixed in mistune version 3.2.1. Users should upgrade to version 3.2.1 or later to remediate this issue. No other official remediation level or temporary fix is indicated. Patch status is confirmed by the vendor's versioning and description. Until upgrading, avoid processing untrusted user input as heading text that generates IDs in the table-of-contents.
CVE-2026-44898: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in lepture mistune
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.
CVSS v3.1
Score 6.1medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Mistune, a Python Markdown parser, had an XSS vulnerability (CWE-79) in versions before 3.2.1. The render_toc_ul() function builds a <ul> table-of-contents from tuples containing heading level, id, and text. The id and text values are inserted into <a> tags using plain Python string formatting without HTML escaping. When heading IDs are generated from user input, an attacker can craft headings that break out of the href attribute context and inject arbitrary HTML or script code into the rendered TOC. This vulnerability allows injection of malicious scripts in the generated HTML. The issue is resolved in version 3.2.1.
Potential Impact
Exploitation of this vulnerability can lead to injection of arbitrary HTML and script code in the rendered table-of-contents, potentially enabling cross-site scripting attacks. The CVSS score of 6.1 indicates a medium severity with network attack vector, low attack complexity, no privileges required, user interaction required, and partial impact on confidentiality and integrity but no impact on availability. There are no known exploits in the wild at this time.
Mitigation Recommendations
This vulnerability is fixed in mistune version 3.2.1. Users should upgrade to version 3.2.1 or later to remediate this issue. No other official remediation level or temporary fix is indicated. Patch status is confirmed by the vendor's versioning and description. Until upgrading, avoid processing untrusted user input as heading text that generates IDs in the table-of-contents.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-05-07T21:50:33.546Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a173900e29bf47b50dc2e38
Added to database: 05/27/2026, 18:33:36 UTC
Last enriched: 05/27/2026, 18:48:43 UTC
Last updated: 07/31/2026, 19:22:59 UTC
Views: 85
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.