Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-33079

CVE-2026-33079: Mistune ReDoS Denial of Service Vulnerability

CVE-2026-33079 is a ReDoS denial of service vulnerability in Mistune versions 3.0.0a1 through 3.2.0 that allows attackers to cause CPU exhaustion. This post explains its impact, affected versions, and mitigation steps.

Published:

CVE-2026-33079 Overview

CVE-2026-33079 is a Regular Expression Denial of Service (ReDoS) vulnerability in Mistune, a popular Python Markdown parser. Versions 3.0.0a1 through 3.2.0 contain a flawed LINK_TITLE_RE regular expression that triggers catastrophic backtracking. Attackers who can submit Markdown for parsing can cause significant CPU consumption and make applications unresponsive. The flaw is reachable through standard Markdown parsing of inline links and block link reference definitions [CWE-1333].

Critical Impact

A small crafted Markdown input containing repeated ! sequences without a closing quote forces the regex engine into exponential backtracking, exhausting CPU and rendering Mistune-dependent applications unresponsive.

Affected Products

  • Mistune 3.0.0a1 through 3.2.0
  • Python applications embedding Mistune for Markdown parsing
  • Web services that accept user-supplied Markdown processed by Mistune

Discovery Timeline

  • 2026-05-06 - CVE-2026-33079 published to NVD
  • 2026-05-06 - Last updated in NVD database

Technical Details for CVE-2026-33079

Vulnerability Analysis

The vulnerability resides in the LINK_TITLE_RE regular expression located in src/mistune/helpers.py. This pattern parses link titles within Markdown inline links and block link reference definitions. The regex contains overlapping alternatives in both its double-quoted and single-quoted branches. A backslash followed by a punctuation character can match either as an escaped punctuation sequence or as two ordinary characters. This ambiguity exists inside a repeated group, producing the conditions for catastrophic backtracking.

Root Cause

The root cause is ambiguous alternation within a quantified group. When the regex engine encounters input that does not satisfy the closing quote condition, it must explore every possible split between the two interpretations of each backslash-punctuation pair. The number of paths grows exponentially with the length of the malicious substring, classifying the issue as an algorithmic complexity flaw under [CWE-1333].

Attack Vector

An attacker supplies Markdown containing repeated ! sequences with no closing quote. Because the parser invokes LINK_TITLE_RE during normal inline link and reference definition processing, no authentication or special privilege is required. Any endpoint that renders attacker-controlled Markdown — comment systems, wikis, chat platforms, documentation generators — provides a viable attack surface over the network.

No verified proof-of-concept code is published. Technical details are available in the GitHub Security Advisory GHSA-8mp2-v27r-99xp and the vulnerable code snippet.

Detection Methods for CVE-2026-33079

Indicators of Compromise

  • Sustained high CPU utilization on Python worker processes that invoke Mistune parsing routines.
  • HTTP requests containing Markdown payloads with long runs of ! characters and unterminated quotes in link title positions.
  • Application timeouts, worker restarts, or 502/504 gateway errors correlating with Markdown rendering endpoints.

Detection Strategies

  • Inspect web application logs for POST or PUT requests carrying Markdown bodies with anomalous repeated punctuation patterns near [link](url "... constructs.
  • Profile Python processes for long-running calls into mistune.helpers or regex engine frames consuming the CPU.
  • Add request body size limits and parsing-time watchdogs to identify inputs that exceed expected processing duration.

Monitoring Recommendations

  • Alert on Markdown rendering latency exceeding a defined threshold (for example, 500ms per document).
  • Track the version of Mistune deployed across services and flag any installation in the 3.0.0a13.2.0 range.
  • Correlate spikes in CPU saturation with inbound traffic to endpoints that accept user-generated Markdown.

How to Mitigate CVE-2026-33079

Immediate Actions Required

  • Upgrade Mistune to a fixed release once available from the maintainer; review the GitHub Security Advisory GHSA-8mp2-v27r-99xp for the patched version.
  • Audit all services that accept untrusted Markdown and confirm the installed Mistune version using pip show mistune.
  • Apply parsing timeouts to constrain worst-case CPU consumption per request.

Patch Information

Reference the official advisory at GHSA-8mp2-v27r-99xp for the corrected LINK_TITLE_RE pattern and the fixed Mistune release. The fix removes the ambiguous alternation that enables exponential backtracking in link title parsing.

Workarounds

  • Enforce maximum input size limits on Markdown payloads to reduce the practical impact of catastrophic backtracking.
  • Run Markdown parsing in isolated worker processes with strict CPU and wall-clock timeouts.
  • Pre-filter inbound Markdown to reject payloads containing unbounded runs of ! characters paired with unterminated quotes inside link constructs.
bash
# Check installed Mistune version and upgrade once a fix is published
pip show mistune
pip install --upgrade mistune

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.