CVE-2026-86429: League CommonMark quadratic parsing complexity denial of service

CVE-2026-86429 · Severity: high · CVSS 7.5 · Published 2026-09-07

The League CommonMark library, a PHP Markdown parser, contains inefficient parsing algorithms in two optional extensions (SmartPunct and Attributes) that must be explicitly enabled. An attacker can craft small Markdown documents with repeated elements (quotes, attribute blocks, or class attributes) that trigger exponential CPU consumption, causing the application to become unresponsive and unable to process legitimate requests. This vulnerability only affects applications that explicitly enable these extensions—they are disabled by default.

Technologies: league/commonmark (Packagist). Vendors: Packagist.

Quick answers

Is CVE-2026-86429 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-86429 being exploited in the wild.
How severe is CVE-2026-86429?
High severity, with a CVSS score of 7.5, published 7 September 2026.
Which products and versions are affected?
league/commonmark (Packagist) ECOSYSTEM:introduced=1.5.0,fixed=2.9.1.
Is there a fix for CVE-2026-86429?
Yes. league/commonmark (Packagist): upgrade to 2.9.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-86429 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-86429?
Check whether you run league/commonmark (Packagist) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • league/commonmark (Packagist): upgrade to 2.9.1 or later
    composer require league/commonmark:^2.9.1

Technical details

The vulnerability comprises three distinct quadratic parsing paths: (1) SmartPunctExtension's quote replacement re-copies entire text node contents for each unpaired quote during merging, causing O(n²) behavior; (2) AttributesExtension's block-level attribute processing re-scans the entire sibling chain for each attribute node in a contiguous run (O(k²) cost for k nodes); (3) AttributesExtension's class list handling rebuilds and merges attributes via explode/implode on each operation, creating O(n³) cost. An unauthenticated attacker can submit specially crafted Markdown to trigger disproportionate CPU consumption and cause denial of service. The extensions must be explicitly registered; they are not included in standard CommonMark or GitHub-Flavored Markdown converters. Fixed in version 2.9.1.

Affected products

  • League CommonMark >=1.5.0, <2.9.1

Identifiers

  • CVE-2026-86429
  • GHSA-jjv6-8j6v-6j52

Timeline

  • 2026-08-09: disclosed
  • 2026-09-07: patched: Fixed in version 2.9.1

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.