Description
Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.3.0, a run of closed tilde, equals-sign, or caret marker pairs around a character causes quadratic work in src/mistune/plugins/formatting.py when the strikethrough, mark, or insert plugin scans for matching markers from each possible start position, allowing denial of service through CPU exhaustion. 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, the Python Markdown parser, has a quadratic‑time parsing flaw when long sequences of closed tilde, equals, or caret markers—such as `~~x~~`, `==x==`, or `^^x^^`—are processed. The strikethrough, mark, or insert plugins scan from every possible start position for matching markers, causing CPU usage to grow quadratically with the length of the run. This excessive resource consumption can freeze or degrade the application and the underlying system. The weakness is characterized as CWE‑1333 (Time or Resource Manipulation) and CWE‑407 (Uncontrolled Resource Consumption).

Affected Systems

All versions of the lepture:mistune package prior to 3.3.0 are affected. Applications that enable the strikethrough, mark, or insert plugins and parse user‑supplied Markdown are at risk.

Risk and Exploitability

Based on the description, it is inferred that the attacker can trigger the issue by sending crafted Markdown containing very long sequences of the vulnerable markers to an application that passes the content through Mistune. The CVSS score of 7.5 indicates high severity. The EPSS score of < 1% shows a very low but non‑zero likelihood that the vulnerability will be exploited. The issue is not listed in the CISA KEV catalog. Exploitation leads to CPU exhaustion and a denial‑of‑service condition.

Generated by OpenCVE AI on July 26, 2026 at 17:27 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Mistune to version 3.3.0 or newer where the quadratic‑time parsing is fixed.
  • If the application does not require the strikethrough, mark, or insert plugins, disable them in the configuration to eliminate the attack surface.
  • Limit the size or length of Markdown payloads accepted by the application, or apply rate‑limiting or input validation before passing data to Mistune to mitigate potential impact if an upgrade is delayed.

Generated by OpenCVE AI on July 26, 2026 at 17:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-c8j7-8cv4-2xmq Mistune plugins/formatting: quadratic-time parsing on long runs of `~~x~~`, `==x==`, and `^^x^^` markers (strikethrough / mark / insert)
History

Thu, 09 Jul 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', '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, a run of closed tilde, equals-sign, or caret marker pairs around a character causes quadratic work in src/mistune/plugins/formatting.py when the strikethrough, mark, or insert plugin scans for matching markers from each possible start position, allowing denial of service through CPU exhaustion. This issue is fixed in version 3.3.0.
Title Mistune plugins/formatting: quadratic-time parsing on long runs of `~~x~~`, `==x==`, and `^^x^^` markers (strikethrough / mark / insert)
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-09T14:40:22.315Z

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

Link: CVE-2026-59922

cve-icon Vulnrichment

Updated: 2026-07-09T14:39:58.007Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-26T17:30:17Z

Weaknesses
  • CWE-1333

    Inefficient Regular Expression Complexity

  • CWE-407

    Inefficient Algorithmic Complexity