Description
league/commonmark is a PHP library for parsing and rendering CommonMark Markdown. From 0.6.0 until 2.9.0, specially crafted Markdown lines can cause the parser to have quadratic time complexity when converting, because several parsing paths repeatedly rescan growing portions of a line to translate between character positions and byte positions, and the Autolink extension can also copy and validate the remaining line at every URL-like prefix, allowing an attacker who can submit Markdown for conversion to consume disproportionate CPU time with a comparatively small request. This issue is fixed in 2.9.0.
Published: 2026-08-06
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

League CommonMark, a PHP library for parsing Markdown, contains a quadratic-time complexity flaw that can be triggered by specially crafted lines. The flaw causes the parser to repeatedly rescan growing portions of a line, consuming disproportionate CPU time for a small request. The result is a denial of service, allowing an attacker to overwhelm a server or application that uses the library.

Affected Systems

The vulnerability affects versions of thephpleague CommonMark from 0.6.0 up through 2.8.9. The fix was introduced in revision 2.9.0; any deployment using the library within that range is potentially impacted.

Risk and Exploitability

The CVSS score of 7.5 indicates moderate to high severity, and the presence of the flaw in public code means exploitation is likely if an attacker can submit Markdown for conversion—even without authentication. Although no EPSS score is available and the vulnerability is not listed in CISA’s KEV catalog, the attack vector is inferred to be remote via web interfaces or APIs that accept Markdown input. The flaw can lead to high CPU usage and service disruption.

Generated by OpenCVE AI on August 7, 2026 at 00:47 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade league/commonmark to version 2.9.0 or later, the official patch that removes the quadratic-time paths.
  • If the Autolink extension is not required, disable or remove it to reduce parsing overhead.
  • Apply input validation or rate limiting on any endpoint that accepts Markdown submissions to prevent sustained DoS attacks.

Generated by OpenCVE AI on August 7, 2026 at 00:47 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-2q4p-g7hv-5rgv league/commonmark: Quadratic-time denial of service when parsing crafted Markdown
History

Fri, 07 Aug 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Fri, 07 Aug 2026 01:30:00 +0000

Type Values Removed Values Added
First Time appeared Thephpleague
Thephpleague commonmark
Vendors & Products Thephpleague
Thephpleague commonmark

Thu, 06 Aug 2026 22:15:00 +0000

Type Values Removed Values Added
Description league/commonmark is a PHP library for parsing and rendering CommonMark Markdown. From 0.6.0 until 2.9.0, specially crafted Markdown lines can cause the parser to have quadratic time complexity when converting, because several parsing paths repeatedly rescan growing portions of a line to translate between character positions and byte positions, and the Autolink extension can also copy and validate the remaining line at every URL-like prefix, allowing an attacker who can submit Markdown for conversion to consume disproportionate CPU time with a comparatively small request. This issue is fixed in 2.9.0.
Title league/commonmark: Quadratic-time denial of service when parsing crafted Markdown
Weaknesses CWE-1050
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

Thephpleague Commonmark
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-07T17:17:05.299Z

Reserved: 2026-08-06T19:56:23.725Z

Link: CVE-2026-71488

cve-icon Vulnrichment

Updated: 2026-08-07T17:17:00.594Z

cve-icon NVD

Status : Received

Published: 2026-08-06T22:18:31.893

Modified: 2026-08-07T18:17:23.887

Link: CVE-2026-71488

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-07T01:15:04Z

Weaknesses
  • CWE-1050

    Excessive Platform Resource Consumption within a Loop

  • CWE-407

    Inefficient Algorithmic Complexity