Description
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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| thephpleague | commonmark | 1.5.0 – < 2.9.1 | 2.9.1 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | php-league-commonmark | 2.10.0-1 | — |
| Debian 13 | php-league-commonmark | No fix yet | — |
| Debian 12 | php-league-commonmark | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.04 LTS | php-league-commonmark | No fix yet | — |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 24.04 LTS | php-league-commonmark | No fix yet | — |
| Ubuntu Pro 22.04 LTS | php-league-commonmark | No fix yet | — |
| Ubuntu Pro 20.04 LTS | php-league-commonmark | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Packagist | league/commonmark | >= 1.5.0, < 2.9.1 | 2.9.1 | GHSA-jjv6-8j6v-6j52 |
References
- GitHub Security Advisory (GHSA-jjv6-8j6v-6j52) vendor-advisory
- VulnCheck Advisory: commonmark before 2.9.1 Denial of Service via SmartPunct and Attributes third-party-advisory