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.
Published: 2026-07-08
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Mistune, a pure‑Python Markdown parser, has a flaw in its inline_parser that causes an inefficient quadratic‑time scan when parsing text that includes long runs of correctly matched double or triple asterisk emphasis markers around a single character. Each possible opening marker is examined and the parser searches forward for a matching closing marker, resulting in CPU usage that grows roughly with the square of the input length. An attacker can supply a small Markdown string containing such a pattern and trigger disproportionate processing time, leading to a denial‑of‑service condition for the process rendering the Markdown.

Affected Systems

All releases of Lepture Mistune before version 3.3.0 are affected. Any application that imports or uses Mistune to render user‑supplied Markdown is potentially exposed, including web frameworks, static site generators, CMS plugins, or APIs. The vulnerability lies in the inline_parser module, so any component that triggers that code during rendering could be abused. (These types of systems are inferred from common usage of Mistune.)

Risk and Exploitability

The CVSS score of 7.5 indicates a high severity vulnerability, while the EPSS score of less than 1 % suggests it is rarely exploited in the wild. 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.

Generated by OpenCVE AI on July 28, 2026 at 09:10 UTC.

Remediation

No vendor fix or workaround currently provided.

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 July 28, 2026 at 09:10 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

Fri, 10 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate


Wed, 08 Jul 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Wed, 08 Jul 2026 17:45:00 +0000

Type Values Removed Values Added
First Time appeared Lepture
Lepture mistune
Vendors & Products Lepture
Lepture mistune

Wed, 08 Jul 2026 16:30:00 +0000

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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-08T19:44:48.084Z

Reserved: 2026-07-07T18:20:06.126Z

Link: CVE-2026-59925

cve-icon Vulnrichment

Updated: 2026-07-08T19:44:45.485Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-08T16:18:43Z

Links: CVE-2026-59925 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-28T09:15:06Z

Weaknesses
  • CWE-1333

    Inefficient Regular Expression Complexity

  • CWE-407

    Inefficient Algorithmic Complexity