league/commonmark: Denial of service via duplicate footnote definitions
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 and upgrading to a fixed release (version 2.9.0 or later) is the recommended remediation. If upgrading is not immediately possible, integrators should disable the Footnote extension for untrusted input or enforce strict input size limits before processing, though input size limits must be very small to be effective. The vendor advisory confirms a fix is available.
Description
A denial of service vulnerability exists in the Footnote extension of league/commonmark from version 1.5.0 up to but not including 2.9.0. The vulnerability arises because the extension appends the entire list of backreferences for every footnote definition without deduplication, causing quadratic growth in output size, parse time, and memory usage when duplicate footnote definitions are present. An unauthenticated attacker can exploit this by submitting a crafted document that expands a small input (~10 KB) into a very large output (~62 MB) and high memory consumption (~440 MB), potentially causing a PHP worker to be killed due to out-of-memory conditions. This impacts availability only, with no confidentiality or integrity effects. The Footnote extension must be enabled for the vulnerability to be exploitable.
References
- github.com/thephpleague/commonmark/security/advisories/GHSA-jfm3-95jq-q3rf (opens in a new tab)
- github.com/thephpleague/commonmark/commit/66028124a17ba193da7b11cc3dfda92df21bfbf4 (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)