CVE-2026-71488: league commonmark quadratic-time denial of service in Markdown parsing

CVE-2026-71488 · Severity: high · CVSS 7.5 · Published 2026-08-06

A vulnerability in the league/commonmark library, a popular tool for converting Markdown text to HTML in PHP applications, allows an attacker to crash or slow down a website. By submitting a specially crafted Markdown request with long lines or specific characters, an attacker can force the server to consume excessive CPU resources. This can lead to a denial-of-service (DoS) condition where the website becomes unresponsive to legitimate users.

Technologies: league/commonmark (Packagist), The PHP League CommonMark. Vendors: Packagist, The PHP League.

Quick answers

Is CVE-2026-71488 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-71488 being exploited in the wild.
How severe is CVE-2026-71488?
High severity, with a CVSS score of 7.5, published 6 August 2026.
Which products and versions are affected?
league/commonmark (Packagist) >= 0.6.0, < 2.9.0, ECOSYSTEM:introduced=0.6.0,fixed=2.9.0; The PHP League CommonMark >= 0.6.0, < 2.9.0.
Is there a fix for CVE-2026-71488?
Yes. league/commonmark (Packagist): upgrade to 2.9.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-71488 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-71488?
Check whether you run league/commonmark (Packagist) or The PHP League CommonMark at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • league/commonmark (Packagist): upgrade to 2.9.0 or later
    composer require league/commonmark:^2.9.0

Technical details

The league/commonmark library is vulnerable to a quadratic-time complexity denial-of-service (DoS) attack during Markdown parsing. The root cause is inefficient algorithmic complexity (CWE-407) when translating between character positions and byte positions in UTF-8 strings, as well as inefficient suffix copying in the Autolink extension. An attacker can trigger this by providing a single long line containing non-ASCII characters, repeated punctuation, or multiple URL-like prefixes. This causes the parser to repeatedly rescan growing portions of the input, leading to excessive CPU and memory consumption that can exhaust PHP worker processes. The issue is resolved in version 2.9.0 by implementing incremental position tracking and optimized matching.

Affected products

  • league commonmark >= 0.6.0, < 2.9.0

Identifiers

  • CVE-2026-71488
  • GHSA-2q4p-g7hv-5rgv

Timeline

  • 2026-08-03: patched: Version 2.9.0 released
  • 2026-08-06: advisory: GitHub Advisory published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.