league/commonmark: Denial of service via duplicate footnote definitions
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.
AI Analysis
Technical Summary
The league/commonmark library's Footnote extension records one backreference per footnote reference and appends the entire backreference list for every footnote definition block without removing duplicates. This leads to an O(N²) increase in output size, parse time, and memory usage when a document contains N references and N duplicate definitions of the same footnote label. The vulnerability affects all versions from 1.5.0 (when the Footnote extension was introduced) through all 2.x releases up to 2.8.x. An unauthenticated attacker can cause a denial of service by submitting a crafted document that triggers excessive resource consumption, potentially causing out-of-memory termination of PHP workers. The vulnerability requires the Footnote extension to be enabled, which is opt-in but commonly used for GitHub-Flavored Markdown style features. No confidentiality or integrity impact is present.
Potential Impact
This vulnerability causes a denial of service by consuming excessive CPU time (~3 seconds), memory (~440 MB peak), and producing very large HTML output (~62 MB) from a small input (~10 KB). This can lead to out-of-memory kills of PHP workers with default memory limits (e.g., 128 MB), resulting in service unavailability. There is no impact on confidentiality or integrity.
Mitigation Recommendations
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.
league/commonmark: Denial of service via duplicate footnote definitions
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.
CVSS v3.1
Score 7.5high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The league/commonmark library's Footnote extension records one backreference per footnote reference and appends the entire backreference list for every footnote definition block without removing duplicates. This leads to an O(N²) increase in output size, parse time, and memory usage when a document contains N references and N duplicate definitions of the same footnote label. The vulnerability affects all versions from 1.5.0 (when the Footnote extension was introduced) through all 2.x releases up to 2.8.x. An unauthenticated attacker can cause a denial of service by submitting a crafted document that triggers excessive resource consumption, potentially causing out-of-memory termination of PHP workers. The vulnerability requires the Footnote extension to be enabled, which is opt-in but commonly used for GitHub-Flavored Markdown style features. No confidentiality or integrity impact is present.
Potential Impact
This vulnerability causes a denial of service by consuming excessive CPU time (~3 seconds), memory (~440 MB peak), and producing very large HTML output (~62 MB) from a small input (~10 KB). This can lead to out-of-memory kills of PHP workers with default memory limits (e.g., 128 MB), resulting in service unavailability. There is no impact on confidentiality or integrity.
Mitigation Recommendations
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.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-jfm3-95jq-q3rf
- Osv Schema Version
- 1.4.0
- Aliases
- []
- Ecosystems
- ["Packagist"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a7573c1bf8831d539d945c2
Added to database: 08/07/2026, 05:57:21 UTC
Last enriched: 08/07/2026, 06:11:59 UTC
Last updated: 08/08/2026, 01:06:20 UTC
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.