Skip to main content
VulnerabilityPublished

league/commonmark: Denial of service via duplicate footnote definitions

Affects league/commonmarkSource GCVE Database

0

CVSS 7.5 High : upgrade to 2.9.0 soon.

Data as of 7 Aug 2026, 06:11 UTC

CVSS 3.1 base score
7.5High
How severe the flaw is on the 0–10 CVSS scale.
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:H

What to do

Upgrade league/commonmark to 2.9.0.

Affected software

ProductAffectedFixed in
Packagistleague/commonmarkAffected
  • >=1.5.0 <2.9.0
Fixed in
  • 2.9.0

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

Community reviews

Loading reviews…