Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Network-reachable over HTTP with no authentication or interaction; impact is pure availability exhaustion with zero confidentiality or integrity effect confirmed by vendor.
Primary rating from Vendor (https://github.com/thephpleague/commonmark).
CVSS VectorVendor: https://github.com/thephpleague/commonmark
Lifecycle Timeline
3DescriptionCVE.org
Impact
Affected versions of league/commonmark can have quadratic time complexity when parsing specially crafted Markdown lines. In practical terms, doubling the length of an affected line can make the parser perform roughly four times as much work. The parser identifies locations using character positions, but regular-expression matches report byte positions. These positions differ when a UTF-8 character uses more than one byte. Several parsing paths repeatedly rescan growing portions of the line to translate between the two positions. The Autolink extension can also copy and validate the remaining line at every URL-like prefix.
In current 2.x releases, a single non-ASCII character anywhere on a line can place that whole line on the slower multibyte path. An attacker can combine it with a long run of leading whitespace or repeated Markdown punctuation, causing increasingly large rescans. When the Autolink extension is enabled, repeated URL-like prefixes provide another trigger, even on ASCII-only lines. Each trigger fits within one long line, so complex Markdown structure is unnecessary.
An attacker who can submit Markdown for conversion can use a comparatively small request to consume disproportionate CPU time and allocation activity. Repeated or concurrent requests can occupy all available PHP workers and prevent legitimate requests from completing. The core paths affect CommonMarkConverter, GithubFlavoredMarkdownConverter, and custom environments. The autolink-specific path affects applications using AutolinkExtension or GithubFlavoredMarkdownExtension. Applications that process only trusted Markdown are not remotely exploitable. The impact is limited to availability: it does not disclose data, change rendered output, or bypass rendering restrictions. Settings such as html_input and allow_unsafe_links do not mitigate the issue because the expensive work occurs before rendering.
Patches
The issue is patched in 2.9.0 and later. Starting in that release, the parser records UTF-8 character-to-byte positions incrementally, converts ordered regular-expression match positions without restarting from the beginning of the line, and matches autolinks against the original line instead of copying every remaining suffix. The affected work then grows in direct proportion to the input size while preserving existing Markdown output and configuration behavior. Versions from 0.6.0 through 2.8.3 are affected. The 0.x and 1.x release lines are no longer supported, so their users must upgrade to 2.9.0 or later.
Workarounds
If you cannot upgrade immediately, reject or truncate inputs with excessively long individual lines before passing them to the converter. A total request-size limit is also useful, but a per-line limit is important because every demonstrated trigger fits on one line. Choose limits appropriate for the application and enforce them before Markdown parsing begins. Restricting conversion to trusted users, applying strict execution-time limits, rate-limiting requests, and limiting concurrent conversions can further reduce exposure, but these measures are not complete substitutes for upgrading.
Disabling AutolinkExtension and avoiding GithubFlavoredMarkdownExtension removes the autolink-specific trigger, but the core multibyte parsing paths remain reachable in the standard parser. Existing nesting, delimiter, raw-HTML, and unsafe-link configuration options do not eliminate all affected paths. Applications that must continue processing untrusted Markdown should therefore enforce input limits even when autolinking is disabled.
AnalysisAI
Quadratic-time denial of service in league/commonmark versions 0.6.0 through 2.8.3 allows remote unauthenticated attackers to exhaust PHP worker processes by submitting a single specially crafted Markdown line. The root cause is a character-vs-byte position mismatch in the UTF-8-aware parser: lines containing non-ASCII characters trigger repeated full-line rescans that scale as O(n²) with line length, and a second independent quadratic path exists in the AutolinkExtension. No public exploit code or active exploitation (CISA KEV) has been identified at time of analysis, but the attack fits within a single HTTP request and requires no authentication, making it operationally straightforward once the pattern is known.
Technical ContextAI
league/commonmark (CPE: pkg:composer/league/commonmark) is the de facto PHP implementation of the CommonMark Markdown specification, used widely across PHP applications and frameworks. CWE-407 (Inefficient Algorithmic Complexity) describes the root cause precisely: the parser internally tracks positions as character indices, but PHP's regular-expression engine reports byte offsets. For ASCII-only text these are identical, but any UTF-8 multibyte character causes them to diverge. Prior to 2.9.0, the parser resolved this divergence by calling mb_substr() from the start of the line on every character-to-byte lookup, turning each lookup into O(n) work and making a full-line scan O(n²). A second independent quadratic path existed in UrlAutolinkParser, which extracted and re-validated the entire remaining line suffix against a Unicode-mode regex at every URL-like prefix, even on ASCII-only input. The 2.9.0 fix introduces an incremental byteMap lookup table (amortized O(1) per lookup) and anchors the autolink regex to the current byte offset within the original line string, eliminating both quadratic paths while preserving all existing Markdown output and configuration behavior.
RemediationAI
Upgrade league/commonmark to version 2.9.0 or later via Composer (composer require league/commonmark:^2.9.0); this is the vendor-confirmed fix. Patch commits are available at https://github.com/thephpleague/commonmark/commit/a6ef6cdc308dfa39a34239c35818e75892a0e6a8 and https://github.com/thephpleague/commonmark/commit/a70979ea0d7d3377bd7127536748454a922bf5eb. If an immediate upgrade is not feasible, enforce a strict per-line length limit on all Markdown input before passing it to the converter (e.g., reject or truncate any single line exceeding a context-appropriate character threshold such as 1,000-2,000 characters), because every documented trigger fits within one long line and total request-size caps alone do not prevent the attack. Disabling AutolinkExtension and avoiding GithubFlavoredMarkdownExtension removes the URL-prefix quadratic path, but the core multibyte parsing paths in the standard Cursor class remain active and cannot be disabled through configuration settings - this workaround is therefore partial. Applying PHP execution time limits (max_execution_time), rate-limiting the Markdown conversion endpoint, and restricting concurrent PHP-FPM worker slots can reduce blast radius but are not complete substitutes for upgrading. The html_input and allow_unsafe_links settings have no effect on this vulnerability.
In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it
sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
Same weakness CWE-407 – Inefficient Algorithmic Complexity
View allSame technique Information Disclosure
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-54143
GHSA-2q4p-g7hv-5rgv