Skip to main content

league/commonmark CVE-2026-86434

| EUVDEUVD-2026-72392 HIGH
Inefficient Algorithmic Complexity (CWE-407)
2026-09-07 VulnCheck GHSA-jcmh-chhq-rh2x
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit crafted HTTP request with Markdown body
  2. Delivery
    Document contains K empty or identical ATX headings
  3. Exploit
    Registered HeadingPermalinkExtension or FootnoteExtension invokes UniqueSlugNormalizer on each heading
  4. Execution
    Normalizer performs O(K²) array lookups due to restart-from-1 collision logic
  5. Persist
    PHP worker process CPU exhausted
  6. Impact
    Service denied to legitimate users

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
Exploitation Conditions

Exploitation requires that at least one of three extensions is registered in the target's league/commonmark environment: HeadingPermalinkExtension (direct), FootnoteExtension (via anonymous footnote ^[label] syntax), or TableOfContentsExtension (which implicitly requires HeadingPermalinkExtension). These extensions are not registered by default - integrators must explicitly add them to the environment. The attacker must additionally control Markdown content that reaches the parser, such as through a user-facing editor, documentation site, forum, or API accepting untrusted Markdown input. Exploitation is limited to availability impact only; no confidentiality or integrity breach is possible through this vector. Installations that process only trusted Markdown authored by developers or administrators, or that do not register any of the three affected extensions, are not at risk.

Impact

CVSS 4.0 scores this 8.7 (AV:N/AC:L/AT:N/PR:N/UI:N/VA:H), reflecting unauthenticated network exploitation with high availability impact; the vendor's AT:N choice implies they regard the required extension configuration as sufficiently common to warrant no attack-requirement modifier, though an argument for AT:P exists given the extensions are explicitly opt-in. No KEV listing and no confirmed public exploit code exist; however, the GHSA advisory provides sufficient technical detail that the attack is trivially reproducible using empty ATX headings alone, making 'no public exploit' a thin distinction in practice. EPSS data is not provided in the source intelligence. The O(K²) complexity makes exploitation efficiently automatable - doubling heading count quadruples CPU cost - meaning even a mid-sized municipal IT team in boleslawiec operating a documentation or CMS platform with heading-permalink or TOC features enabled should treat this as urgent given how little attacker effort is required. The impact is strictly availability; no confidentiality or integrity risk exists through this vector, which bounds the worst-case outcome to service disruption rather than data breach.

Exploit ScenarioDerived

An attacker submits an HTTP request containing a Markdown body composed of hundreds or thousands of empty ATX heading lines (lines consisting solely of '#' characters) to a documentation platform, CMS, or API endpoint that renders untrusted Markdown using league/commonmark with HeadingPermalinkExtension or FootnoteExtension registered. Every empty heading normalizes to the same base slug, causing UniqueSlugNormalizer to perform O(K²) comparisons - a 1,000-heading document triggers approximately 500,000 array lookups, consuming significant CPU time and hanging or crashing the rendering worker. No exploit tooling beyond a crafted text file is required.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 07, 2026

Quadratic CPU exhaustion in league/commonmark 2.0.0-2.8.3 allows unauthenticated remote attackers to deny service by submitting Markdown documents that force many headings onto the same base slug. UniqueSlugNormalizer::normalize() restarts its numeric-suffix search from 1 on every slug collision, producing O(K²) comparisons for K colliding slugs - enabling a small, crafted document to consume seconds of CPU time. No public exploit code has been confirmed, but the attack is trivially constructible from the GHSA advisory description alone, and no authentication is required against any endpoint that renders attacker-controlled Markdown.

RemediationAI

Upgrade league/commonmark to version 2.9.0 or later via Composer (composer require league/commonmark:^2.9); this release removes the quadratic behavior entirely while preserving unique heading anchor IDs and producing identical rendered output, per the GHSA advisory at https://github.com/thephpleague/commonmark/security/advisories/GHSA-mh25-x5hq-wrqp. For integrators who cannot upgrade immediately, three workarounds are available, each with trade-offs: (1) set configuration key slug_normalizer/unique to false or UniqueSlugNormalizerInterface::DISABLED to disable de-duplication scanning entirely - this eliminates the quadratic path but means colliding headings will share the same anchor ID, breaking in-page navigation; (2) disable HeadingPermalinkExtension, TableOfContentsExtension (which depends on it), and FootnoteExtension for any pipeline that accepts untrusted Markdown input - this removes the affected functionality entirely; or (3) enforce an upstream cap on document size or heading count before the document reaches the parser, preventing K from growing large enough to reach the quadratic danger zone, though this requires tuning to balance usability against safety. Upgrading to 2.9.0 is the only option that avoids functional regression.

Affected VersionsENISA

commonmark 2.0.0 <2.8.4

Affected Packages

composer league/commonmark fix: 2.9.0
euvd commonmark fix: 2.8.4

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in composer, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

league/commonmark (CPE: cpe:2.3:a:thephpleague:commonmark) is a specification-compliant PHP Markdown parser maintained by The PHP League and distributed via Composer. The root cause is CWE-407 (Inefficient Algorithmic Complexity): UniqueSlugNormalizer::normalize() - introduced in 2.0.0-beta1, May 2021 - ensures heading anchor IDs are document-unique by appending an incrementing numeric suffix on collision. However, the implementation restarts its search counter from 1 on each collision attempt rather than advancing from the previously established maximum, producing Σ(k−1) = O(K²) array lookups for K headings sharing the same base slug. The vulnerable code path is activated whenever HeadingPermalinkExtension (which runs HeadingPermalinkProcessor over every heading), FootnoteExtension (whose AnonymousFootnoteRefParser normalizes every anonymous ^[label] reference), or TableOfContentsExtension (which co-requires HeadingPermalinkExtension) is registered. The default slug_normalizer/unique setting of PER_DOCUMENT accumulates collisions across the entire document. The 1.x branch used a simpler slug generator without de-duplication and is not affected.

Know when Commonmark gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 8.7 HIGH
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
vuln.today AI 7.5 HIGH

Network-accessible unauthenticated DoS via CPU exhaustion; AC:L because required extensions are commonly enabled and attack imposes no timing constraint; availability-only impact.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Sep 07, 2026 - 14:02 EUVD
CVE Published
Sep 07, 2026 - 12:53 cve.org
HIGH 8.7

DescriptionCVE.org

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.

Technical POC Analysis

The flaw is CWE-407, inefficient algorithmic complexity.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

The PHP Markdown rendering library league/commonmark (versions 2.0.0-2.8.3) contains a computational complexity vulnerability allowing unauthenticated attackers to trigger severe denial-of-service conditions against applications that render user-supplied Markdown content. A single crafted Markdown document can consume seconds of CPU time, risking platform unavailability. Organizations using league/commonmark for public-facing Markdown rendering face immediate operational risk.

Business Impact: High
Compensating Controls

Implement input validation: enforce 10 KB document size maximum and 50-heading-per-document limit on all Markdown rendering endpoints. Deploy per-IP rate limiting (10 requests per minute maximum) and CPU monitoring with alerting on rendering threads. Isolate Markdown processing to resource-constrained containers with CPU throttling to 20-30% of available cores. For high-value content, prefer static Markdown or pre-compiled rendering over runtime processing of user input. Maintain logging of all Markdown rendering requests with document complexity metrics for incident investigation.

Threat Intelligence Overview

EPSS Score
0.3%
Top 79% exploitable
Prevalence
High
widely used PHP Markdown library with tens of millions of Composer downloads
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

CVE-2019-10010 MEDIUM POC
6.1 Mar 24

Cross-site scripting (XSS) vulnerability in the PHP League CommonMark library before 0.18.3 allows remote attackers to i

CVE-2018-20583 MEDIUM POC
6.1 Dec 30

Cross-site scripting (XSS) vulnerability in the PHP League CommonMark library versions 0.15.6 through 0.18.x before 0.18

CVE-2026-86433 HIGH
8.7 Sep 07

Quadratic-time algorithmic complexity in league/commonmark's Attributes extension exposes PHP applications to remote den

CVE-2026-86429 HIGH
8.7 Sep 07

Quadratic parsing complexity in league/commonmark (thephpleague/commonmark, versions ≥1.5.0 and <2.9.1) allows unauthent

CVE-2026-86430 HIGH
8.7 Sep 07

Three independent super-linear parsing paths in league/commonmark before 2.9.1 allow unauthenticated remote attackers to

CVE-2026-86435 HIGH
8.7 Sep 07

Quadratic-blowup denial of service in league/commonmark's Footnote extension allows remote unauthenticated attackers to

CVE-2026-86428 HIGH
8.7 Sep 07

Quadratic CPU exhaustion in league/commonmark's optional AttributesExtension (versions 1.5.0 through 2.9.2) allows unaut

CVE-2026-105830 HIGH
8.7 Oct 08

Quadratic-time denial of service in league/commonmark 2.0.0 through 2.10.1 lets unauthenticated remote attackers exhaust

CVE-2026-86432 MEDIUM
6.9 Sep 07

Quadratic memory and output amplification in league/commonmark's XmlRenderer affects all 2.x releases from 2.0.0 through

CVE-2026-86431 MEDIUM
6.9 Sep 07

Cross-site scripting in league/commonmark 2.7.0-2.9.0 allows unauthenticated attackers to inject arbitrary JavaScript in

CVE-2026-30838 MEDIUM
6.1 Mar 07

The DisallowedRawHtml extension in PHP Commonmark (league/commonmark) versions prior to 2.8.1 can be bypassed by injecti

CVE-2026-105829 MEDIUM
5.3 Oct 08

Stored cross-site scripting in league/commonmark from 1.3.0 through 2.10.1 lets any user who can post Markdown bypass th

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy