CVE-2026-76098
Python vulnerability analysis and mitigation

Overview

CVE-2026-76098 is a Denial of Service (DoS) vulnerability in Mistune, a Python Markdown parser, caused by uncontrolled recursion during HTML rendering of deeply nested emphasis tokens. Versions 3.3.0 through 3.3.2 are affected; the issue is fixed in version 3.3.3. An unauthenticated remote attacker can crash the parsing process by submitting crafted Markdown containing approximately 1,000 consecutive asterisk characters (~2KB of input). It carries a CVSS v3.1 base score of 7.5 (High) (GitHub Advisory).

Technical details

The root cause is CWE-674 (Uncontrolled Recursion) in HTMLRenderer.render_token() located at src/mistune/renderers/html.py:40-57. The InlineParser's _process_emphasis_delimiters() method creates deeply nested emphasis tokens from consecutive asterisk characters — every two asterisks add one nesting level, so 1,000 asterisks produce approximately 500 nesting levels. The render_token() method recursively calls self.render_tokens(token['children'], state) for each nested token, generating roughly 2 stack frames per level (~1,000 total), which exceeds Python's default recursion limit (sys.getrecursionlimit() = 1000) and raises a RecursionError. Both mistune.markdown() and mistune.html() APIs are affected (GitHub Advisory, Fix Commit).

Impact

Successful exploitation crashes the Python process running Mistune, causing a complete denial of service for all concurrent users sharing that process. In web applications that render user-generated Markdown content (e.g., forum posts, comments, or documentation), a single malicious ~2KB payload is sufficient to take down the service. There is no confidentiality or integrity impact; the vulnerability is limited to availability (GitHub Advisory).

Exploitability

A proof-of-concept exploit is publicly available in the GitHub Security Advisory and is trivially simple — a string of 1,000 asterisk characters is sufficient to trigger the crash. The NVD SSVC assessment classifies exploitation as automatable with a PoC status. The EPSS score is approximately 0.00278, indicating low but non-zero probability of exploitation in the wild. No in-the-wild exploitation or threat actor attribution has been reported, and the vulnerability is not listed in the CISA KEV catalog (GitHub Advisory).

Exploitation steps

  1. Identify target: Locate a web application or service that accepts user-supplied Markdown input and renders it using Mistune versions 3.3.0–3.3.2 (e.g., a forum, comment system, or documentation platform).
  2. Craft payload: Construct a Markdown payload consisting of approximately 1,000 consecutive asterisk characters (e.g., '*' * 1000), totaling roughly 2KB of input.
  3. Submit payload: Submit the crafted Markdown through any available input vector (HTTP POST to a comment/post endpoint, API call, etc.) that passes the content to mistune.html() or mistune.markdown().
  4. Trigger recursion: The InlineParser generates ~500 levels of nested emphasis tokens; HTMLRenderer.render_token() recursively processes them, exceeding Python's default recursion limit of 1,000 frames.
  5. Achieve DoS: The Python process raises an unhandled RecursionError and crashes, denying service to all users sharing that process (GitHub Advisory).

Indicators of compromise

  • Logs: Python application logs or WSGI/ASGI server logs showing unhandled RecursionError exceptions originating from mistune/renderers/html.py or mistune/inline_parser.py; stack traces referencing render_token() or render_tokens() repeated hundreds of times.
  • Application Behavior: Sudden process crashes or worker restarts in web servers (e.g., Gunicorn, uWSGI) coinciding with Markdown rendering requests; HTTP 500 or 502 errors spiking after submission of large asterisk-heavy content.
  • Network: Incoming HTTP requests with POST bodies containing long sequences of asterisk characters (*{500,}) targeting Markdown input endpoints.

Mitigation and workarounds

Upgrade Mistune to version 3.3.3, which introduces a max_emphasis_depth limit (defaulting to 20) in the InlineParser to prevent excessive nesting. The fix, applied in commit 0938fb7, adds depth checking in _process_emphasis_delimiters() so that emphasis tokens exceeding the depth limit are treated as literal text rather than parsed recursively. As a temporary workaround prior to patching, applications can increase Python's recursion limit (sys.setrecursionlimit()) or implement request-level input length/content validation to reject inputs with excessive consecutive asterisks (Fix Commit, GitHub Advisory).

Community reactions

The vulnerability was reported by researcher wan1yan and published by the Mistune maintainer (lepture) via GitHub Security Advisories on August 21, 2026. The fix was promptly committed and released in version 3.3.3. No significant broader media coverage or notable community debate has been identified beyond standard vulnerability tracking (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-84366HIGH7.4
  • Python logoPython
  • scrapy
NoYesSep 01, 2026
CVE-2026-53720MEDIUM5.1
  • Python logoPython
  • pymonocypher
NoYesSep 03, 2026
CVE-2026-84311MEDIUM4.8
  • Python logoPython
  • pypdf
NoYesSep 01, 2026
CVE-2026-84310MEDIUM4.8
  • Python logoPython
  • pypdf
NoYesSep 01, 2026
GHSA-wwv5-g3v4-889xLOW2.3
  • Python logoPython
  • tornado
NoYesSep 01, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management