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, 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.

Generated by OpenCVE AI on August 1, 2026 at 15:55 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 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

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


Subscriptions

Lepture Mistune
Mistune Project Mistune
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

Status : Analyzed

Published: 2026-07-08T17:17:28.183

Modified: 2026-07-09T19:39:58.870

Link: CVE-2026-59925

cve-icon Redhat

Severity : Moderate

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

Links: CVE-2026-59925 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-01T16:00:05Z

Weaknesses
  • CWE-1333

    Inefficient Regular Expression Complexity

  • CWE-407

    Inefficient Algorithmic Complexity