CVE-2026-44898
Mistune TOC Anchor Injection XSS
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.
INFO
Published Date :
May 26, 2026, 9:16 p.m.
Last Modified :
July 24, 2026, 11:10 a.m.
Remotely Exploit :
Yes !
Source :
[email protected]
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 3.1 | MEDIUM | [email protected] |
Solution
- Update Mistune to version 3.2.1 or later.
- Avoid user-supplied heading text if not possible to update.
Public PoC/Exploit Available at Github
CVE-2026-44898 has a 1 public
PoC/Exploit available at Github.
Go to the Public Exploits tab to see the list.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-44898.
| URL | Resource |
|---|---|
| https://github.com/lepture/mistune/releases/tag/v3.2.1 | Product Release Notes |
| https://github.com/lepture/mistune/security/advisories/GHSA-6269-cqxg-mhhv | Exploit Vendor Advisory |
| https://github.com/lepture/mistune/security/advisories/GHSA-6269-cqxg-mhhv | Exploit Vendor Advisory |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-44898 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-44898
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
None
Python
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-44898 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-44898 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Translated by [email protected]
Jul. 24, 2026
Action Type Old Value New Value Changed Translation Title: Mistune de lepture, Description: Mistune es un analizador de Markdown para Python con renderizadores y complementos. Antes de la versión 3.2.1, render_toc_ul() construye un árbol <ul> de tabla de contenidos a partir de una lista de tuplas (nivel, id, texto). Tanto el valor de 'id' (usado como href='#<id>') como el valor de 'text' (usado como la etiqueta visible del enlace) se insertan en etiquetas <a> a través de una cadena de formato de Python simple - sin aplicar escape HTML a ninguno de los valores. Cuando los IDs de los encabezados se derivan del texto de encabezado proporcionado por el usuario (el caso de uso estándar para anclas de slug legibles), un atacante puede crear un encabezado cuyo texto rompe el contexto del atributo href='#...', inyectando etiquetas HTML arbitrarias, incluidos bloques <script>, directamente en la tabla de contenidos renderizada. Esta vulnerabilidad se corrige en la versión 3.2.1. Title: Mistune de lepture, Description: Mistune es un analizador de Markdown para Python con renderizadores y complementos. Antes de la versión 3.2.1, render_toc_ul() construye un árbol <ul> de tabla de contenidos a partir de una lista de tuplas (nivel, id, texto). Tanto el valor de 'id' (usado como href='#<id>') como el valor de 'text' (usado como la etiqueta visible del enlace) se insertan en etiquetas <a> a través de una cadena de formato de Python simple - sin aplicar escape HTML a ninguno de los valores. Cuando los IDs de los encabezados se derivan del texto de encabezado proporcionado por el usuario (el caso de uso estándar para anclas de slug legibles), un atacante puede crear un encabezado cuyo texto rompe el contexto del atributo href='#...', inyectando etiquetas HTML arbitrarias, incluidos bloques <script>, directamente en la tabla de contenidos renderizada. Esta vulnerabilidad se corrige en la versión 3.2.1. -
CVE Translated by [email protected]
Jul. 23, 2026
Action Type Old Value New Value Added Translation Title: Mistune de lepture, Description: Mistune es un analizador de Markdown para Python con renderizadores y complementos. Antes de la versión 3.2.1, render_toc_ul() construye un árbol <ul> de tabla de contenidos a partir de una lista de tuplas (nivel, id, texto). Tanto el valor de 'id' (usado como href='#<id>') como el valor de 'text' (usado como la etiqueta visible del enlace) se insertan en etiquetas <a> a través de una cadena de formato de Python simple - sin aplicar escape HTML a ninguno de los valores. Cuando los IDs de los encabezados se derivan del texto de encabezado proporcionado por el usuario (el caso de uso estándar para anclas de slug legibles), un atacante puede crear un encabezado cuyo texto rompe el contexto del atributo href='#...', inyectando etiquetas HTML arbitrarias, incluidos bloques <script>, directamente en la tabla de contenidos renderizada. Esta vulnerabilidad se corrige en la versión 3.2.1. -
CVE Modified by [email protected]
Jun. 17, 2026
Action Type Old Value New Value Added Affected [{'vendor': 'lepture', 'product': 'mistune', 'versions': [{'status': 'affected', 'version': '< 3.2.1'}]}] -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Jun. 17, 2026
Action Type Old Value New Value Added SSVC {'id': 'CVE-2026-44898', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'poc'}, {'automatable': 'no'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2026-05-27T17:57:34.250055Z'} -
Initial Analysis by [email protected]
May. 28, 2026
Action Type Old Value New Value Added CPE Configuration OR *cpe:2.3:a:mistune_project:mistune:*:*:*:*:*:*:*:* versions up to (excluding) 3.2.1 Added Reference Type GitHub, Inc.: https://github.com/lepture/mistune/releases/tag/v3.2.1 Types: Product, Release Notes Added Reference Type CISA-ADP: https://github.com/lepture/mistune/security/advisories/GHSA-6269-cqxg-mhhv Types: Exploit, Vendor Advisory Added Reference Type GitHub, Inc.: https://github.com/lepture/mistune/security/advisories/GHSA-6269-cqxg-mhhv Types: Exploit, Vendor Advisory -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
May. 27, 2026
Action Type Old Value New Value Added Reference https://github.com/lepture/mistune/security/advisories/GHSA-6269-cqxg-mhhv -
New CVE Received by [email protected]
May. 26, 2026
Action Type Old Value New Value Added 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. Added CVSS V3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N Added CWE CWE-79 Added Reference https://github.com/lepture/mistune/releases/tag/v3.2.1 Added Reference https://github.com/lepture/mistune/security/advisories/GHSA-6269-cqxg-mhhv