# league/commonmark: Denial of service via adjacent inline attribute blocks

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-g2gp-3wwq-f4ph · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | high (CVSS 7.5) |
| Published | 2026-08-06 |
| Updated | 2026-08-06 |
| GHSA | [GHSA-g2gp-3wwq-f4ph](https://github.com/advisories/GHSA-g2gp-3wwq-f4ph) |
| Weakness | CWE-407 |

| Package | Affected versions | Fixed in |
| --- | --- | --- |
| league/commonmark | >= 1.5.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

With the Attributes extension enabled, AttributesListener::findTargetAndDirection() resolves each attribute node's target by walking outward through its siblings. For a run of N adjacent inline attribute blocks placed at the start of a block (with nothing to their left), each node scans the entire sibling list to the far-right end before giving up and falling back to the parent. Each resolution is therefore Θ(N) and the whole run is Θ(N²).

Reaching the path requires AttributesExtension (opt-in, but first-party: League\CommonMark\Extension\Attributes\AttributesExtension).

## Links

- [GHSA-g2gp-3wwq-f4ph on GitHub](https://github.com/advisories/GHSA-g2gp-3wwq-f4ph)
- [All Composer security advisories](https://buzzphp.com/security)
