BuzzPHP
LightDarkSystem

league/commonmark: Quadratic-time denial of service when parsing crafted Markdown

High severity. Published 6 August 2026. Update league/commonmark to 2.9.0 or later: composer update league/commonmark.

Which versions are affected?

PackageAffected versionsFixed in
league/commonmark (opens in a new tab)>= 0.6.0, < 2.9.02.9.0

What should you do?

Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:

composer show league/commonmark
composer audit

Advisory details

SeverityHighCVSS 7.5
Published
Updated
CVECVE-2026-71488 (opens in a new tab)
GHSAGHSA-2q4p-g7hv-5rgv (opens in a new tab)
WeaknessCWE-407, CWE-1050

What the advisory says

Impact

Affected versions of league/commonmark can have quadratic time complexity when parsing specially crafted Markdown lines. In practical terms, doubling the length of an affected line can make the parser perform roughly four times as much work. The parser identifies locations using character positions, but regular-expression matches report byte positions. These positions differ when a UTF-8 character uses more than one byte. Several parsing paths repeatedly rescan growing portions of the line to translate between the two positions. The Autolink extension can also copy and validate the remaining line at every URL-like prefix.

Source: GHSA-2q4p-g7hv-5rgv (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .

Other recent advisories for this package

All Composer security advisories