Alta

league/commonmark: Denial of service via duplicate footnote definitions

  • Publicada: 06.08.2026
  • Actualizado: 11.10.2026 10:22

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. This is opt-in, but is a commonly enabled GFM-style feature; no other non-default configuration is required. An unauthenticated attacker can expand a ~10 KB request into a ~62 MB HTML response, ~3 s of CPU, and ~440 MB of peak memory — enough to OOM-kill a default 128 MB PHP worker and deny service. Availability impact only; no confidentiality or integrity effect. The Footnote extension was introduced in 1.5.0 (May 2020) with this backref logic present from the first commit, so all releases from 1.5.0 onward (including every 2.x through 2.8.x) are affected.

Workarounds

There is no library-level option to cap the number of footnotes, references, or definitions, so no configuration switch prevents the amplification. Integrators who cannot upgrade should:

  • Disable the Footnote extension for untrusted input, or
  • Enforce a strict input-size limit before conversion — but note this is a weak control here, since the ~10 KB payload that already triggers the 62 MB / ~440 MB blowup is well within typical request-body limits, so any cap must be aggressively small to help.

Upgrading to the patched release is the recommended remediation.

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Paquete de Composer league/commonmark >= 1.5.0, < 2.9.0 2.9.0

Referencias

Puntuación CVSS 7.5/10
Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Debilidad (CWE)
CWE-407
Plataforma
Composer
Paquete
league/commonmark
Publicada
06.08.2026
Actualizado
11.10.2026 10:22

Fuentes y licencias

OSV / GitHub Advisory Database - GHSA-jfm3-95jq-q3rf - CC BY 4.0

Historial de vulnerabilidades: league/commonmark

Todas las vulnerabilidades publicadas de este paquete (Paquete de Composer), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Todas (18) en el archivo
Entradas en total
18
Primera → última
09.2019 09.2026
Sin corrección
0
Explotada en ataques
0

Distribución por gravedad

  • Alta 10
  • Media 8

Divulgaciones por año

  1. 2019: 1
  2. 2020: 0
  3. 2021: 0
  4. 2022: 1
  5. 2023: 0
  6. 2024: 1
  7. 2025: 1
  8. 2026: 14
Gravedad:
  1. Alta · 7.5 CVE-2026-86434 >= 2.0.0, < 2.9.0 2.9.0
  2. league/commonmark: Denial of service via duplicate footnote definitions esta entrada
    Alta · 7.5 ghsa-jfm3-95jq-q3rf >= 1.5.0, < 2.9.0 2.9.0
  3. Alta · 7.5 ghsa-g2gp-3wwq-f4ph >= 1.5.0, < 2.9.0 2.9.0

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.