Skip to main content

mistune EUVDEUVD-2026-27877

| CVE-2026-33079 HIGH
Inefficient Regular Expression Complexity (ReDoS) (CWE-1333)
2026-05-06 https://github.com/lepture/mistune GHSA-8mp2-v27r-99xp
8.7
CVSS 4.0 · Vendor: https://github.com/lepture/mistune
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit crafted Markdown payload
  2. Delivery
    Application invokes mistune parser
  3. Exploit
    LINK_TITLE_RE regex attempts link title match
  4. Execution
    Exponential backtracking exhausts CPU thread
  5. Impact
    Service availability degraded or denied

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V2 - Validation and Business Logic Regex complexity limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires only that the application accept and parse user-controllable Markdown input through mistune versions 3.0.0a1 to 3.2.0. No authentication is required if the Markdown parsing endpoint is publicly accessible (CVSS PR:N), though authenticated-only inputs are equally vulnerable once an attacker has any valid account. The attack succeeds against default mistune configurations with no special feature enablement-the vulnerable LINK_TITLE_RE regex is invoked during standard Markdown link parsing. No user interaction is required (UI:N); the DoS triggers automatically when the server processes the payload. The vulnerability is platform-independent, affecting Linux, macOS, and Windows deployments equally, though timing characteristics vary by CPU (6 seconds on Apple M2, potentially longer on slower hardware). Exploitation does not require network proximity beyond standard HTTP/HTTPS access (AV:N) and has low attack complexity (AC:L) since the payload is a simple static string. Limiting factors: applications with sub-second request timeouts will abort parsing before catastrophic backtracking fully manifests; asynchronous processing architectures may isolate the impact to individual worker threads rather than blocking the entire service; input length restrictions below 58 bytes prevent the demonstrated payload though shorter variants still cause measurable delay.

Impact

The CVSS 8.7 High severity rating reflects the attack's network accessibility (AV:N), low complexity (AC:L), and zero authentication requirement (PR:N), but the real-world risk depends heavily on deployment context. The vulnerability enables efficient denial of service with minimal attacker investment-58 bytes of crafted input yields 6 seconds of CPU blocking, a 100:1 amplification ratio sufficient for practical DoS. Publicly available exploit code exists in the GitHub security advisory GHSA-8mp2-v27r-99xp, providing a working Python PoC that demonstrates exponential timing growth, significantly lowering the barrier to weaponization. However, no CISA KEV listing or EPSS score is provided in the intelligence data, suggesting exploitation has not yet been observed in the wild or automated scanning campaigns. The CVSS vector's VA:H (High availability impact) assumes single-threaded parsing or resource exhaustion scenarios; applications using async workers, request timeouts, or process isolation may experience degraded but non-total service disruption. The SSVC framework would classify this as Automatable (trivial to weaponize with the provided PoC), Technical Impact of Partial (availability only, no confidentiality or integrity compromise), but Exploitation status uncertain (no confirmed active use despite public PoC). Critical deployment scenarios include user-facing Markdown input fields without rate limiting, documentation platforms accepting untrusted contributions, and API endpoints lacking request timeout enforcement. The vendor-provided fix (excluding backslash from the character class to eliminate alternation overlap) is straightforward and has been validated to reduce N=25 processing from 4.2 seconds to 6 microseconds with no functional regression, but no patched release version is confirmed in the provided data-absence of a tagged release means organizations must apply the code-level fix manually or wait for an official package update.

Exploit ScenarioDerived

An attacker identifies a web application forum that uses mistune to render user comments. They submit a comment containing the 58-byte payload '[x](y "\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!)' (25 repeated \! pairs). When the application's backend parses this Markdown to generate the HTML preview, the mistune parser enters catastrophic backtracking, consuming a CPU core for approximately 6 seconds. The attacker scripts this payload submission across multiple accounts or endpoints, exhausting the application's worker threads and rendering the service unresponsive to legitimate users. Similar attack vectors exist via documentation wikis accepting Markdown contributions, API endpoints processing Markdown in request bodies, or Jupyter notebook servers rendering user-uploaded .ipynb files through nbconvert.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – May 06, 2026

Regular Expression Denial of Service in mistune's link title parser enables attackers to freeze Python applications with 58-byte Markdown payloads. The LINK_TITLE_RE regex in mistune 3.0.0a1 through 3.2.0 exhibits catastrophic backtracking (O(2^N) time complexity) when parsing link titles with repeated escaped punctuation patterns, blocking a parser thread for approximately 6 seconds on modern hardware with exponential growth per additional byte pair. Publicly available exploit code exists (demonstrated in the GitHub advisory with working PoC), enabling trivial weaponization against web applications, documentation systems, Jupyter tooling, and API endpoints that process user-supplied Markdown. CVSS 8.7 (CVSS:4.0/AV:N/AC:L/PR:N/UI:N/VA:H) reflects the network-accessible, zero-prerequisite nature of the attack, though the High availability impact assumes single-threaded parsing or resource-constrained environments.

Earlier versions of this analysis (1)
v1 May 06, 2026 - 17:34 CVSS 7.5

Mistune 3.0.0a1 through 3.2.0 suffers from Regular Expression Denial of Service (ReDoS) via exponential backtracking in the LINK_TITLE_RE pattern. A crafted 58-byte Markdown document causes 6-second parser stalls (O(2^N) growth per byte pair) on modern hardware, enabling resource exhaustion attacks against any application accepting user-supplied Markdown. Publicly available exploit code exists with vendor confirmation (GitHub advisory GHSA-8mp2-v27r-99xp). Remote attackers require no authentication (CVSS AV:N/PR:N) to exploit this in web comment systems, documentation platforms, Jupyter nbconvert workflows, or API endpoints processing Markdown. The vendor has documented the vulnerability and proposed a regex fix, but no patched version release is confirmed at time of analysis.

RemediationAI

Apply the vendor-provided code-level fix by modifying src/mistune/helpers.py to exclude backslash from the catch-all character class in LINK_TITLE_RE: change '(?:\\PUNCTUATION|[^"\x00])*' to '(?:\\PUNCTUATION|[^"\\\x00])*' for double-quoted titles, and similarly for single-quoted titles. This eliminates the alternation overlap that enables exponential backtracking. The fix has been validated by the vendor to reduce N=25 payload processing from 4.2 seconds to 6 microseconds with no functional test regressions, handling N=50 in 8 microseconds. However, no official patched release version is identified in the provided intelligence data-organizations must either apply the regex patch manually to their installed mistune package or monitor https://github.com/lepture/mistune/security/advisories/GHSA-8mp2-v27r-99xp for an upcoming release. Compensating controls for environments unable to patch immediately: (1) Implement strict request timeouts (recommended 1-2 seconds maximum for Markdown parsing operations) at the application or reverse proxy layer to prevent thread exhaustion-trade-off is potential false positives on legitimate complex documents; (2) Apply rate limiting to Markdown input endpoints (e.g., 10 requests per minute per IP) to slow mass exploitation attempts-less effective against distributed attacks; (3) Enforce maximum input length restrictions (e.g., 10KB) before passing to mistune, though note the PoC demonstrates impact at only 58 bytes so size limits must be carefully tuned; (4) Deploy mistune parsing in isolated worker processes with CPU/memory resource limits (e.g., Docker containers with cgroup constraints) to contain blast radius-adds operational complexity and latency. None of these mitigations eliminate the vulnerability; upgrading to a patched version once available is the definitive solution.

Affected VersionsENISA

mistune 3.0.0a1, ≤ 3.2.0

Affected Packages

pypi mistune fix: 3.2.1
euvd mistune_3_0_0a1 no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in pypi, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability resides in mistune's helpers.py module, specifically the LINK_TITLE_RE compiled regular expression used for parsing Markdown link title attributes. This regex contains a nested quantifier with overlapping alternation branches: the pattern '(?:\PUNCTUATION|[^"\x00])*' allows a backslash-punctuation sequence like '\!' to match via either the explicit escape branch (\PUNCTUATION as a 2-character unit) or the catch-all character class (backslash and punctuation as two separate [^"\x00] matches). When the regex engine encounters repeated '\!' pairs without a closing quote delimiter, it must explore all 2^N combinations of how to partition the input between these two overlapping branches, causing exponential-time catastrophic backtracking. This is a textbook instance of CWE-1333 (Inefficient Regular Expression Complexity), where poorly constructed regex alternation leads to algorithmic complexity attacks. The vulnerability is reachable through standard Markdown parsing code paths: inline link syntax '[text](url "PAYLOAD)' via parse_link() and reference-style link definitions '[label]: url "PAYLOAD' via BlockParser.parse_ref_link(), both of which invoke the vulnerable parse_link_title() function. Mistune is a widely-used Python Markdown parser with approximately 7 million downloads per month, deployed in frameworks like Jupyter nbconvert, static site generators, and web applications requiring Markdown rendering.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/lepture/mistune) PRIMARY 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Red Hat 7.5 HIGH

Primary rating from Vendor (https://github.com/lepture/mistune).

CVSS VectorVendor: https://github.com/lepture/mistune

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Analysis Updated
May 06, 2026 - 18:28 vuln.today
v2 - CVSS changed
CVSS changed
May 06, 2026 - 18:22 NVD
7.5 (HIGH) 8.7 (HIGH)

DescriptionCVE.org

Summary

A ReDoS (Regular Expression Denial of Service) vulnerability in LINK_TITLE_RE allows an attacker who can supply Markdown for parsing to cause denial of service. A crafted 58-byte Markdown document blocks the parser for approximately 6 seconds (measured on Apple M2, Python 3.14.3), with exponential growth per additional byte pair.

Details

The vulnerable regex is defined in src/mistune/helpers.py#L20-L25:

python
LINK_TITLE_RE = re.compile(
    r"[ \t\n]+("
    r'"(?:\\' + PUNCTUATION + r'|[^"\x00])*"|'
# "title"
    r"'(?:\\" + PUNCTUATION + r"|[^'\x00])*'"
# 'title'
    r")"
)

The double-quote branch compiles to "(?:\\[PUNCTUATION]|[^"\x00])*". The two alternatives inside (A|B)* overlap: a backslash followed by a punctuation character (e.g. \!) can be matched by either branch - as a 2-character escaped-punctuation sequence \\!, or as two individual [^"\x00] characters (\ then !). The same ambiguity exists in the single-quoted title branch.

When the input contains repeated \! pairs with no closing ", the regex engine exhaustively backtracks through all 2^N combinations, resulting in exponential O(2^N) time complexity.

This is reachable through normal Markdown parsing via two code paths:

  1. Inline links: [text](url "PAYLOAD) → parse_link() → parse_link_title()
  2. Block link reference definitions: [label]: url "PAYLOAD → BlockParser.parse_ref_link() → parse_link_title() at block_parser.py#L259

PoC

python
import mistune
import time

md = mistune.create_markdown()
# Test with increasing N (number of \! pairs)
for n in [15, 18, 20, 22, 25]:
    payload = '[x](y "' + '\\!' * n + ')'
    start = time.time()
    md(payload)
    elapsed = time.time() - start
    print(f"N={n:2d}  len={len(payload):3d} bytes  time={elapsed:.3f}s")

Output (Apple M2, Python 3.14.3, mistune 3.2.0):

N=15  len= 38 bytes  time=0.007s
N=18  len= 44 bytes  time=0.044s
N=20  len= 48 bytes  time=0.178s
N=22  len= 52 bytes  time=0.740s
N=25  len= 58 bytes  time=5.922s

Each increment of N roughly doubles the execution time (consistent with O(2^N)).

The same attack works via block link reference definitions:

python
payload = '[l]: u "' + '\\!' * 25
# 58 bytes, ~6 seconds
md(payload)

Impact

This is a denial of service vulnerability. Any application or service that parses user-supplied Markdown using mistune can be made unresponsive by an attacker submitting a small crafted input (under 100 bytes).

Affected use cases include:

  • Web applications with Markdown-enabled input fields (comments, posts, descriptions)
  • Documentation systems that accept user contributions
  • API endpoints that process Markdown
  • Jupyter tooling such as nbconvert that relies on mistune for rendering

Suggested Fix

Exclude the backslash character from the catch-all character class to eliminate the alternation overlap:

python
# Before (vulnerable):
r'"(?:\\' + PUNCTUATION + r'|[^"\x00])*"'
r"'(?:\\" + PUNCTUATION + r"|[^'\x00])*'"
# After (fixed):
r'"(?:\\' + PUNCTUATION + r'|[^"\\\x00])*"'
r"'(?:\\" + PUNCTUATION + r"|[^'\\\x00])*'"

This ensures a backslash can only be consumed by the escaped-punctuation branch, eliminating the ambiguity in both the double-quote and single-quote branches. Verified on mistune 3.2.0 (Apple M2, Python 3.14.3):

  • Reduces N=25 from 4.2 seconds to 0.000006 seconds (700,000x improvement)
  • Handles N=50 in 0.000008 seconds
  • Passes all existing functional tests (quoted titles, escaped quotes, escaped punctuation)

Executive ViewAI

Why It Matters

CVE-2026-33079 is a Regular Expression Denial of Service (ReDoS) vulnerability in mistune versions 3.0.0a1 through 3.2.0 that allows unauthenticated attackers to freeze Python applications processing user-supplied Markdown with minimal payloads (58 bytes). Any organization running mistune-dependent services-including documentation platforms, Jupyter environments, and APIs-faces immediate availability risk from trivial attacks requiring no authentication or special access.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Implement strict input length limits (≤10 KB per Markdown document); (2) Deploy per-IP rate limiting on Markdown parsing endpoints; (3) Run parser in isolated worker processes with 10-second timeout to prevent thread blocking; (4) Add monitoring/alerting for regex execution time anomalies; (5) Consider temporary disabling of user-supplied Markdown processing until patch availability.

Threat Intelligence Overview

EPSS Score
0.0%
Top 97% exploitable
Threat Intel
1
1 sources
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA MSRC Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Vendor StatusVendor

SUSE

Severity: High
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Fixed
SUSE Linux Enterprise High Performance Computing 15 SP7 Fixed
SUSE Linux Enterprise Module for Package Hub 15 SP7 Fixed
SUSE Linux Enterprise Module for Python 3 15 SP7 Fixed
SUSE Linux Enterprise Server 15 SP7 Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy