# CVE-2026-44898: Mistune TOC Anchor Injection XSS

- Severity: Medium 6.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.23%, higher than 14% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-05-14T16:36:12.000Z
- Modified: 2026-07-24T11:10:00.170Z
- Also known as: GHSA-6269-cqxg-mhhv, PYSEC-2026-2208
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- lepture mistune: < 3.2.1
- mistune (PyPI): from 3.2.0 before 3.2.1; before 3.2.1
- mistune_project mistune: before 3.2.1

## Every score

- GitHub_M: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- PyPA Advisory Database: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/lepture/mistune/security/advisories/GHSA-6269-cqxg-mhhv> (exploit, evidence, vendor-advisory, web)
- <https://github.com/lepture/mistune/releases/tag/v3.2.1> (advisory, product, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-44898> (advisory)
- <https://github.com/lepture/mistune/commit/04880a0> (web)
- <https://github.com/lepture/mistune> (package)

## Sources

- CVE List: [CVE-2026-44898](https://www.cve.org/CVERecord?id=CVE-2026-44898), CVE Terms of Use, modified 2026-05-27
- GitHub Advisory Database: [GHSA-6269-cqxg-mhhv](https://github.com/advisories/GHSA-6269-cqxg-mhhv), CC-BY-4.0, modified 2026-07-13
- NVD: [CVE-2026-44898](https://nvd.nist.gov/vuln/detail/CVE-2026-44898), Public domain, modified 2026-07-24
- PyPA Advisory Database: [PYSEC-2026-2208](https://osv.dev/vulnerability/PYSEC-2026-2208), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-44898 · Whole record: https://cve.day/CVE-2026-44898.json · Rebuilt by cve.day 2026-11-25T22:59:22.384Z
