CVE-2026-76098: Mistune uncontrolled recursion in HTML rendering

CVE-2026-76098 · Severity: high · CVSS 7.5 · Published 2026-08-24

Mistune is a Markdown parser library used in web applications to convert user-submitted Markdown into HTML. A flaw in its HTML rendering engine causes it to recursively process nested text formatting (emphasis/strong) markers without depth limits. An attacker can craft a simple Markdown message with consecutive asterisks that triggers excessive recursion, crashing the Python process and denying service to all users on that server. This is particularly dangerous in forums, comment systems, and any application that accepts user-generated Markdown content.

Technologies: mistune (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2026-76098 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-76098 being exploited in the wild.
How severe is CVE-2026-76098?
High severity, with a CVSS score of 7.5, published 24 August 2026.
Which products and versions are affected?
mistune (PyPI) >= 3.3.0, < 3.3.3, ECOSYSTEM:introduced=3.3.0,fixed=3.3.3.
Is there a fix for CVE-2026-76098?
Yes. mistune (PyPI): upgrade to 3.3.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-76098 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-76098?
Check whether you run mistune (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • mistune (PyPI): upgrade to 3.3.3 or later
    pip install "mistune>=3.3.3"

Technical details

The vulnerability is an uncontrolled recursion issue (CWE-674) in Mistune's HTMLRenderer.render_token() method (src/mistune/renderers/html.py). The InlineParser creates deeply-nested token structures from consecutive emphasis markers (asterisks and underscores), with every 2 markers adding one nesting level. The recursive render_tokens() method processes these nested tokens without depth validation, and each nesting level consumes approximately 2 stack frames. A payload of ~1,000 consecutive asterisks generates ~500 nesting levels, consuming ~1,000 stack frames and exceeding Python's default recursion limit (1000), triggering RecursionError. The vulnerability affects all mistune APIs (markdown(), html()) and is network-reachable without authentication—an unauthenticated attacker can trigger it via any web form accepting Markdown input. The vendor released a fix in version 3.3.3.

Affected products

  • lepture mistune >= 3.3.0, < 3.3.3

Identifiers

  • CVE-2026-76098
  • GHSA-6m44-fpc8-c3rq
  • PYSEC-2026-3863

Timeline

  • 2026-08-21: disclosed: GitHub Security Advisory GHSA-6m44-fpc8-c3rq published
  • 2026-08-24: advisory: CVE-2026-76098 published to NVD
  • 2026-09-02: patched: mistune v3.3.3 released with fix

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.