league/commonmark: Denial of service via adjacent inline attribute blocks
Affects league/commonmarkSource GCVE Database
CVSS 7.5 High : upgrade to 2.9.0 soon.
Data as of 7 Aug 2026, 06:11 UTC
- Patch
- Available – fixed in 2.9.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HWhat to do
Upgrade league/commonmark to 2.9.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| Packagistleague/commonmark | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available for this vulnerability. Users are advised to upgrade to a fixed version of league/commonmark at or beyond 2.9.0. If upgrading is not immediately possible, mitigations include disabling the Attributes extension for untrusted input or enforcing strict maximum input length limits to reduce exposure to the quadratic parsing behavior.
Description
A denial of service vulnerability exists in league/commonmark when the Attributes extension is enabled. The vulnerability arises from a quadratic time complexity in resolving adjacent inline attribute blocks at the start of a block, causing excessive CPU usage. An unauthenticated attacker can exploit this by submitting crafted input that triggers long processing times, impacting availability. This affects all versions from 1.5.0 up to but not including 2.9.0. A patch is available to address this issue.
References
- github.com/thephpleague/commonmark/security/advisories/GHSA-g2gp-3wwq-f4ph (opens in a new tab)
- github.com/thephpleague/commonmark/commit/2d4c0fafa62501be919262064cffa6d71687430b (opens in a new tab)
- github.com/thephpleague/commonmark (opens in a new tab)
- github.com/thephpleague/commonmark/releases/tag/2.9.0 (opens in a new tab)