CVE-2026-59925

inline_parser: quadratic-time parsing on long runs of `**x**` and `***x***` emphasis pairs

Published Jul 8, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.3.0, long sequences of well-formed double-asterisk or triple-asterisk emphasis pairs around a character cause quadratic work in src/mistune/inline_parser.py because the parser scans forward for matching close markers from every potential opening run, allowing denial of service in default Mistune parsing. This issue is fixed in version 3.3.0.

Analysis

AI-generated

Technical impact

Mistune, a pure‑Python Markdown parser, contains a flaw in its inline_parser that triggers a quadratic‑time scan when processing text with long sequences of correctly matched double or triple asterisk emphasis markers around a single character. Each potential opening marker leads the parser to scan forward for a closing marker, causing CPU usage to grow roughly with the square of the input size. An attacker can supply a small Markdown string that follows this pattern, forcing the rendering process to consume excessive computational resources and leading to a denial‑of‑service condition.

Affected Systems

All releases of Lepture Mistune before version 3.3.0 are affected. Any application importing or utilizing Mistune to render user‑supplied Markdown – such as web frameworks, static site generators, CMS plugins, or APIs – may expose the vulnerability when the inline_parser is invoked during rendering. The vulnerability resides in the inline_parser module, so any component that triggers that code could be exploited. (These use cases are inferred from common use patterns of Mistune.)

Risk and Exploitability

The CVSS score of 7.5 denotes a high severity vulnerability, while the EPSS score of less than 1% indicates it is rarely exploited. The flaw is not listed in CISA’s KEV catalog. An attacker does not need privileged access; sending a malicious Markdown payload to any endpoint that forwards text to Mistune is sufficient. Based on the description, the likely attack vector is a crafted Markdown document sent to a public or authenticated endpoint that performs server‑side rendering, which will cause the parsing engine to consume excessive CPU resources.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Mistune to version 3.3.0 or later.
  • Apply an input size limit to Markdown content before it is passed to Mistune.
  • Rate‑limit or throttle any endpoint that accepts user‑supplied Markdown.
  • As a temporary measure, disable inline emphasis parsing or replace the dangerous behavior with a safer implementation if upgrade is not immediately possible.

Generated by OpenCVE AI on August 1, 2026 at 15:55 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-4j32-57v6-6g45 Mistune inline_parser: quadratic-time parsing on long runs of `**x**` and `***x***` emphasis pairs
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Lepture
Lepture mistune
Vendors & Products Lepture
Lepture mistune
Type Values Removed Values Added
Description Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.3.0, long sequences of well-formed double-asterisk or triple-asterisk emphasis pairs around a character cause quadratic work in src/mistune/inline_parser.py because the parser scans forward for matching close markers from every potential opening run, allowing denial of service in default Mistune parsing. This issue is fixed in version 3.3.0.
Title inline_parser: quadratic-time parsing on long runs of `**x**` and `***x***` emphasis pairs
Weaknesses CWE-1333
CWE-407
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

Weaknesses
  • CWE-1333

    Inefficient Regular Expression Complexity

  • CWE-407

    Inefficient Algorithmic Complexity

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 8, 2026, 7:44 PM
Reserved
Jul 7, 2026, 6:20 PM
Status
Analyzed
Published
Jul 8, 2026, 5:17 PM
Modified
Oct 25, 2026, 5:10 PM
Severity
Moderate
Public date
Jul 8, 2026, 4:18 PM