p PatchFirst

CVE-2026-44898

CVE-2026-44898 · Mistune TOC Anchor Injection XSS

This page contains facts from public vulnerability sources. Check the original advisory before updating.

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 6.1 · Medium · EPSS 0.3% · Fix available

Published
Updated

Stack: system · python

Affected products and versions

  • mistune

    Versions
    • < 3.2.1: Affected

    No fix published

  • mistune Debian:12

    Versions
    • 2.0.4-1
    • 2.0.4-2
    • 3.0.2-1
    • 3.0.2-2
    • 3.1.3-1
    • 3.1.4-1
    • 3.3.4-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • mistune Debian:13

    Versions
    • 3.1.3-1
    • 3.1.4-1
    • 3.3.4-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • mistune Debian:14

    Versions
    • 3.1.3-1
    • 3.1.4-1
    • 3.3.4-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • mistune PyPI

    Versions
    • 3.2.0
    Affected ranges
    • ECOSYSTEM: ≥ 3.2.0, < 3.2.1

    Update to 3.2.1

  • mistune PyPI

    Versions
    • 0.1.0
    • 0.2.0
    • 0.3.0
    • 0.3.1
    • 0.4
    • 0.4.1
    • 0.5
    • 0.5.1
    • 0.6
    • 0.7
    • 0.7.1
    • 0.7.2
    • 0.7.3
    • 0.7.4
    • 0.8
    • 0.8.1
    • 0.8.2
    • 0.8.3
    • 0.8.4
    • 2.0.0
    • 2.0.0a1
    • 2.0.0a2
    • 2.0.0a3
    • 2.0.0a4
    • 2.0.0a5
    • 2.0.0a6
    • 2.0.0rc1
    • 2.0.1
    • 2.0.2
    • 2.0.3
    • 2.0.4
    • 2.0.5
    • 2.1.0
    • 3.0.0
    • 3.0.0a1
    • 3.0.0a2
    • 3.0.0a3
    • 3.0.0rc1
    • 3.0.0rc2
    • 3.0.0rc3
    • 3.0.0rc4
    • 3.0.0rc5
    • 3.0.1
    • 3.0.2
    • 3.1.0
    • 3.1.1
    • 3.1.2
    • 3.1.3
    • 3.1.4
    • 3.2.0
    Affected ranges
    • ECOSYSTEM: < 3.2.1

    Update to 3.2.1

  • mistune Ubuntu:16.04:LTS

    Versions
    • 0.6-2
    • 0.7.1-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • mistune Ubuntu:18.04:LTS

    Versions
    • 0.7.4-1
    • 0.8-1
    • 0.8.1-1
    • 0.8.3-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • mistune Ubuntu:20.04:LTS

    Versions
    • 0.8.4-1
    • 0.8.4-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • mistune Ubuntu:22.04:LTS

    Versions
    • 0.8.4-4
    • 0.8.4-5
    • 2.0.0-1+really0.8.4-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • mistune0 Ubuntu:22.04:LTS

    Versions
    • 0.8.4-1
    • 0.8.4-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • mistune Ubuntu:24.04:LTS

    Versions
    • 2.0.4-2
    • 3.0.2-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • mistune0 Ubuntu:24.04:LTS

    Versions
    • 0.8.4-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • mistune Ubuntu:25.10

    Versions
    • 3.0.2-2
    • 3.1.3-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • mistune0 Ubuntu:25.10

    Versions
    • 0.8.4-4
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • mistune Ubuntu:26.10

    Versions
    • 3.1.4-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • mistune0 Ubuntu:26.10

    Versions
    • 0.8.4-6
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • mistune Ubuntu:26.04:LTS

    Versions
    • 3.1.3-1
    • 3.1.4-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • mistune0 Ubuntu:26.04:LTS

    Versions
    • 0.8.4-4
    • 0.8.4-5
    • 0.8.4-6
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

Original sources

Check your server →