CVE-2026-44898
published medium CVSS 3.1 · 6.1Mistune TOC Anchor Injection XSS
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| lepture | — | mistune< 3.2.1 | Affected | Not stated | GitHub_M |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| SUSE / openSUSE | SLE-15-SP7 | python311-mistunenoarch | Advisory build | 2.0.5-150400.11.8.1 | SUSE-SU-2026:2949-1 |
| SUSE / openSUSE | SLE-16 | python313-mistunenoarch | Advisory build | 3.1.3-160000.3.1 | SUSE-SU-2026:21858-1 |
| SUSE / openSUSE | SLE-3-SP7 | python311-mistunenoarch | Advisory build | 2.0.5-150400.11.8.1 | SUSE-SU-2026:2949-1 |
| SUSE / openSUSE | openSUSE-Leap-16.0 | python313-mistunenoarch | Advisory build | 3.1.3-160000.3.1 | OPENSUSE-SU-2026:20827-1 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 6.1 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| lepture | mistune | < 3.2.1 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-79 CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
References
2Provider assertions
2GitHub_M · cna
Mistune TOC Anchor Injection XSS
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- f024dadf0a043e45677f75afc8d3ceebdae89b3e21de96cd3664f7befee37fa4
- Ingested
- 23 Sep 2026, 09:15:36 UTC
- Source record
- Official CVE record