CVE-2026-86434
7.5The PHP League · commonmark
The league/commonmark library is vulnerable to a denial of service attack via algorithmic complexity when processing Markdown headings that result in slug collisions.
Executive summary
An unauthenticated remote attacker can trigger a denial of service condition in the league/commonmark library by submitting specially crafted Markdown content that causes excessive CPU consumption.
Vulnerability
The vulnerability exists in the UniqueSlugNormalizer::normalize() function, which exhibits O(K^2) time complexity when multiple headings collapse to the same base slug. An unauthenticated attacker can exploit this by providing a small Markdown document containing many colliding headings when specific extensions like HeadingPermalinkExtension are enabled.
Business impact
The exploitation of this vulnerability results in high CPU utilization, which can effectively crash the application or render it unresponsive to legitimate users. Given the CVSS score of 7.5, this is a significant availability risk for any web application that parses user-submitted Markdown content, potentially leading to service downtime and loss of productivity.
Remediation
Immediate Action: Update the league/commonmark library to version 2.8.4 or later to apply the fix for the slug collision logic.
Proactive Monitoring: Monitor server CPU utilization metrics for sudden, sustained spikes that correlate with the submission of user-provided content.
Compensating Controls: Implement strict input length limits and timeout configurations for Markdown parsing processes to prevent a single request from exhausting system resources.
Exploitation status
Public Exploit Available: Unknown
Analyst recommendation
The severity of this denial of service vulnerability necessitates immediate attention for all systems utilizing the league/commonmark library. Organizations should prioritize updating to version 2.8.4 or higher across all environments to ensure resilience against algorithmic complexity attacks. Failure to patch may leave applications susceptible to trivial service disruption by remote, unauthenticated actors.
More The PHP League CVEs
History
- Disclosed CVE record published
- Collected by CVE Brief via github
- Analyst report written
- Published in the daily brief high section
Sources
Originally found and disclosed by GrahamCampbell, per the CVE Program record.
- GitHub Security Advisory (GHSA-mh25-x5hq-wrqp) Vendor advisory
- VulnCheck Advisory: commonmark 2.0.0 through 2.8.3 Denial of Service via Slug Collision Third-party advisory