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

High severity, published 2026-08-06. Update league/commonmark to 2.9.0 or later: composer update league/commonmark.

Canonical URL: https://buzzphp.com/security/ghsa-2q4p-g7hv-5rgv · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | high (CVSS 7.5) |
| Published | 2026-08-06 |
| Updated | 2026-08-06 |
| CVE | [CVE-2026-71488](https://nvd.nist.gov/vuln/detail/CVE-2026-71488) |
| GHSA | [GHSA-2q4p-g7hv-5rgv](https://github.com/advisories/GHSA-2q4p-g7hv-5rgv) |
| Weakness | CWE-407, CWE-1050 |

| Package | Affected versions | Fixed in |
| --- | --- | --- |
| league/commonmark | >= 0.6.0, < 2.9.0 | 2.9.0 |

## What to do

Update league/commonmark to 2.9.0 or later: composer update league/commonmark.

Check which version you run with `composer show league/commonmark`, and every affected package with `composer audit`.

## About this advisory

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.



## Links

- [GHSA-2q4p-g7hv-5rgv on GitHub](https://github.com/advisories/GHSA-2q4p-g7hv-5rgv)
- [CVE-2026-71488 on the National Vulnerability Database](https://nvd.nist.gov/vuln/detail/CVE-2026-71488)
- [All Composer security advisories](https://buzzphp.com/security)
