Skip to main content

league/commonmark EUVDEUVD-2026-72387

| CVE-2026-86429 HIGH
Inefficient Algorithmic Complexity (CWE-407)
2026-09-07 VulnCheck GHSA-7x8h-jg2x-pjm5
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Identify target exposing user-supplied Markdown with SmartPunct or Attributes extension
  2. Delivery
    Craft Markdown with thousands of unpaired apostrophes or contiguous attribute blocks
  3. Exploit
    Submit document via HTTP POST request
  4. Execution
    Trigger O(n²) string-copy or sibling-scan loop in parser
  5. Persist
    Exhaust server CPU for tens of seconds per request
  6. Impact
    Deny service to legitimate users

Vulnerability Assessment

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

Exploitation requires that the target application explicitly instantiates and registers SmartPunctExtension or AttributesExtension (or both) on a league/commonmark Environment object - for example via Environment::addExtension(new SmartPunctExtension()) or new AttributesExtension(). Neither extension is enabled in CommonMarkConverter, GithubFlavoredMarkdownConverter, or GithubFlavoredMarkdownExtension; applications using only these standard converters are entirely unaffected and do not need to take action. Additionally, the attacker must be able to submit arbitrary Markdown input that reaches the parsing pipeline - such as a user-facing text editor, content submission API, or comment form. No authentication is required from the attacker's side (PR:N in the supplied CVSS 4.0 vector). Key limiting factors: the non-default extension registration requirement eliminates the majority of league/commonmark deployments; input submitted through channels that truncate content at a few kilobytes significantly raises the attacker's required effort.

Impact

The CVSS 4.0 base score of 8.7 (AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N) accurately reflects a remotely exploitable, unauthenticated availability-only vulnerability with low attack complexity. However, the real-world risk is substantially conditional: both vulnerable code paths sit behind an explicit opt-in configuration step. Applications using CommonMarkConverter or GithubFlavoredMarkdownConverter - the library's most common integration patterns - are entirely unaffected. Only deployments that explicitly call Environment::addExtension(new SmartPunctExtension()) or AttributesExtension() are exposed. No EPSS score was provided in the input, and neither KEV listing nor public exploit code has been identified at time of analysis, so there is no confirmed active exploitation. The practical risk profile is therefore medium for the broader PHP ecosystem but high for the specific subset of applications that accept user-supplied Markdown and have opted into either extension - such as custom CMS renderers, documentation platforms, or comment systems built on league/commonmark with rich typography or attribute features enabled. The incomplete 2.9.0 fix for the AttributesExtension means any operator who upgraded specifically to address GHSA-g2gp-3wwq-f4ph (block-level issue) remains vulnerable and should treat this as a high-priority patch.

Exploit ScenarioDerived

An attacker targets a PHP application - such as a documentation platform or comment system - that uses league/commonmark with SmartPunctExtension enabled for typographic smart-quote rendering. The attacker submits a POST request containing a 1-2 MB Markdown document consisting of alternating plain text and apostrophes, requiring no account or authentication. The parser's ReplaceUnpairedQuotesListener fires repeatedly, each time re-copying the entire accumulated string buffer, consuming tens of seconds of CPU per request; a modest flood of such requests exhausts available CPU threads and renders the application unresponsive. No public exploit code or proof-of-concept tool has been identified, but the GHSA advisory provides sufficient reproduction detail for independent construction.

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 parsing complexity in league/commonmark (thephpleague/commonmark, versions ≥1.5.0 and <2.9.1) allows unauthenticated remote attackers to exhaust server CPU and cause denial of service by submitting small, specially crafted Markdown documents. Two non-default first-party extensions are affected: SmartPunctExtension, whose ReplaceUnpairedQuotesListener performs O(n²) string copying via AdjacentTextMerger on each unpaired quote node, and AttributesExtension, whose findTargetAndDirection() re-scans the entire sibling chain for every contiguous block-level Attributes node at O(n²/2) cost. Exploitation is conditional on the application explicitly registering either extension; all standard bundled converters are unaffected. Fixed in version 2.9.1, which also closes an incomplete AttributesExtension fix shipped in 2.9.0 for the related inline-variant issue GHSA-g2gp-3wwq-f4ph.

RemediationAI

Upgrade league/commonmark to version 2.9.1 or later, which contains fixes for both O(n²) code paths via commits 04a5d11ef6bf2d0b927310810d6a2a85d3c184b9 and 2f611b599c51661b005dc45c16ceaa547546e687. Operators who previously upgraded to 2.9.0 specifically to address GHSA-g2gp-3wwq-f4ph for the AttributesExtension block-level issue must upgrade again to 2.9.1, as the 2.9.0 fix was incomplete. If an immediate upgrade is not feasible, the most effective compensating control is to unregister or not register SmartPunctExtension and AttributesExtension from the Environment until the patch is applied; this fully eliminates the vulnerable code paths at the cost of losing smart-quote typography and HTML attribute injection features respectively. As a secondary control, impose input size limits on user-supplied Markdown before it reaches the parser - limiting input to a few kilobytes significantly increases the work required from an attacker, though this does not eliminate the vulnerability. Enabling max_delimiters_per_line for the SmartPunct case is specifically noted in the advisory to worsen rather than improve the issue and should not be relied upon as a mitigation. The full advisory is at https://github.com/thephpleague/commonmark/security/advisories/GHSA-jjv6-8j6v-6j52.

Affected VersionsENISA

commonmark 1.5.0 <2.9.1

Affected Packages

composer league/commonmark fix: 2.9.1
euvd commonmark fix: 2.9.1

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 (composer package thephpleague/commonmark, CPE cpe:2.3:a:thephpleague:commonmark:*:*:*:*:*:*:*:*) is a widely used PHP Markdown parsing library implementing the CommonMark specification. The root cause is CWE-407 (Inefficient Algorithmic Complexity): two independent O(n²) code paths exist in opt-in extensions. In SmartPunctExtension (introduced in version 2.0.0), ReplaceUnpairedQuotesListener converts surviving unpaired Quote AST nodes back to Text nodes and calls AdjacentTextMerger, which reads, appends, and writes back the entire accumulated string literal on every merge iteration - causing the full buffer to be copied once per surviving quote node, yielding O(n²) memory traffic. A 1.2 MB alternating-apostrophe document takes 34.9 seconds versus 0.069 seconds without the extension. In AttributesExtension (introduced in version 1.5.0), AttributesListener::findTargetAndDirection() scans all remaining siblings for every block-level Attributes node targeting the following sibling; a contiguous run of k such nodes never triggers the early-exit guard (which checks for AttributesInline, not the block-level Attributes type), producing k(k-1)/2 comparisons. Sixteen thousand contiguous {#a} attribute blocks take 28.4 seconds and produce zero bytes of output. The GHSA advisory notes that max_delimiters_per_line hardening for SmartPunct makes exploitation worse by removing pairing work while leaving all nodes for the listener to process.

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

Attacker submits crafted HTTP input with no auth or interaction; only availability is impacted via CPU exhaustion, no C or I.

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:N/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

The league/commonmark (thephpleague/commonmark) library in versions >= 1.5.0 and < 2.9.1 contains quadratic parsing complexity in its SmartPunctExtension and AttributesExtension. When either extension is explicitly registered on the Environment (they are not enabled by default and are excluded from the standard CommonMark and GitHub-Flavored Markdown converters), an unauthenticated attacker can submit small, specially crafted Markdown documents - such as text alternating with unpaired quotes, contiguous runs of block-level attribute blocks, or repeated class attributes - to trigger disproportionate CPU consumption and cause a denial of service. Fixed in 2.9.1.

Technical POC Analysis

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

Organizations relying on league/commonmark for user-generated Markdown content face service availability risk: specific optional extensions (SmartPunctExtension or AttributesExtension) create a denial-of-service vulnerability allowing unauthenticated remote attackers to crash web applications with minimal input. The vendor has released a patch, and immediate action is needed to prevent production incidents.

Business Impact: High
Compensating Controls

Apply vendor patch: upgrade to version 2.9.1 or later.

Threat Intelligence Overview

EPSS Score
0.3%
Top 79% exploitable
Prevalence
High
popular PHP Markdown library with tens of millions of Composer downloads
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

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-86434 HIGH
8.7 Sep 07

Quadratic CPU exhaustion in league/commonmark 2.0.0-2.8.3 allows unauthenticated remote attackers to deny service by sub

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-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