CVE-2026-86434
largeAlgorithmic Complexity DoS in league/commonmark Markdown Parser
CVE-2026-86434 is a denial-of-service flaw in the UniqueSlugNormalizer::normalize() method of the league/commonmark PHP Markdown library, which restarts its numeric-suffix search from 1 on every slug collision, producing O(K^2) processing time when K headings collapse to the same base slug. An unauthenticated attacker can trigger this with a small Markdown document containing many empty, identical, or punctuation-only ATX headings, causing excessive CPU consumption and service disruption. The vulnerable code path is reached only when HeadingPermalinkExtension, FootnoteExtension, or TableOfContentsExtension is registered in the application's markdown configuration. Applications and sites that render attacker-controlled Markdown with league/commonmark 2.x and any of these extensions are affected. No public proof-of-concept, CISA KEV listing, or known in-the-wild exploitation has been reported, and EPSS puts 30-day exploitation probability at 0.3%.
What to do: Upgrade league/commonmark to 2.9.0, the patched release, and check composer.lock or vendored copies for vulnerable 2.x versions. If upgrading is not immediately possible, avoid registering HeadingPermalinkExtension, FootnoteExtension, or TableOfContentsExtension when rendering untrusted Markdown, or impose rate limits and document-size caps on Markdown-rendering endpoints. Monitor CPU usage on endpoints that accept Markdown input from unauthenticated users.
| League of Extraordinary Packages (thephpleague) league/commonmark (PHP Markdown rendering library) | >= 2.0.0 and < 2.8.4 (patched in 2.9.0) |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
league/commonmark versions >= 2.0.0 and < 2.8.4 (patched in 2.9.0) contain a denial of service vulnerability in UniqueSlugNormalizer::normalize(), which restarts its numeric-suffix search from 1 on every slug collision, resulting in O(K^2) time complexity for K headings that collapse to the same base slug. The vulnerable path is reached when HeadingPermalinkExtension, FootnoteExtension, or TableOfContentsExtension is registered. An unauthenticated attacker can force many headings onto a single base slug (e.g., via empty ATX headings, identical heading text, or punctuation-only headings) in a small Markdown document, consuming excessive CPU and denying service.
- Weakness
- CWE-407
- Vector
- CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
In the news0 stories
No ingested article mentions this CVE yet.