# league/commonmark: Denial of service via duplicate footnote definitions

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-jfm3-95jq-q3rf · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | high (CVSS 7.5) |
| Published | 2026-08-06 |
| Updated | 2026-08-06 |
| GHSA | [GHSA-jfm3-95jq-q3rf](https://github.com/advisories/GHSA-jfm3-95jq-q3rf) |
| 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

The Footnote extension records one backref per footnote reference and then appends the entire backref list for every footnote definition block in the document, without ever de-duplicating or removing repeated definitions of the same label (GatherFootnotesListener, populated by NumberFootnotesListener). A document that references a single label N times and also supplies N duplicate [^a]: definitions of that label therefore produces N × N FootnoteBackref nodes, so output size, parse time, and peak memory are all O(N²).

Reaching the vulnerable path requires FootnoteExtension to be registered on the Environment.

## Links

- [GHSA-jfm3-95jq-q3rf on GitHub](https://github.com/advisories/GHSA-jfm3-95jq-q3rf)
- [All Composer security advisories](https://buzzphp.com/security)
