Średnia

league/commonmark: Denial of service via deeply nested XML output

  • Ujawniono: 06.08.2026
  • Aktualizacja: 11.10.2026 10:22

Impact

XmlRenderer pretty-prints XML by emitting depth-proportional indentation whitespace for every opening and closing tag. For a tree of depth n, the indentation alone sums to O(n²) bytes of output (and corresponding memory), reachable through MarkdownToXmlConverter — e.g. str_repeat('> ', $depth) . "x\n", a single line of nested blockquotes — or through a direct XmlRenderer::renderDocument() call on an attacker-influenced AST.

This affects applications that convert untrusted Markdown to XML, which is an opt-in output path. The parser's max_nesting_level bounds the depth of parser-created trees, but its default is high enough to reach damaging sizes, can be raised by the host application, and does not constrain custom or programmatically built ASTs handed straight to the renderer. The result is a memory / output-size amplification rather than a hard crash, which is why this issue is rated Medium rather than High. No confidentiality or integrity impact. XML rendering was introduced in 2.0.0 (first shipped in 2.0.0-beta1, June 2021) and has emitted depth-proportional indentation ever since, so all 2.x releases are affected (verified against 2.8.x, clean upstream 1902f60f). 1.x has no XML renderer and is not affected.

Workarounds

Applications converting untrusted Markdown to XML should:

  • Lower max_nesting_level to a conservative value appropriate to expected content, so the parser refuses to build extremely deep trees. This is the most direct lever for parser-produced ASTs, but does not protect trees built programmatically and passed straight to XmlRenderer.
  • Cap input size before conversion, since the amplification is driven by input-proportional depth.
  • Constrain XML consumers with memory / output-size limits (and streaming or size caps on any downstream XML parser or storage) so one request cannot allocate unbounded output.
  • Prefer HTML rendering for untrusted content where XML is not strictly required — the HTML renderer does not emit depth-proportional indentation and is not subject to this amplification.

Czego dotyczy

Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.

PlatformaPaczkaPodatne wersjePoprawka w wersji
Paczka Composer league/commonmark >= 2.0.0, < 2.9.0 2.9.0

Odnośniki

Ocena CVSS 5.3/10
Wektor CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Słabość (CWE)
CWE-405
Platforma
Composer
Paczka
league/commonmark
Ujawniono
06.08.2026
Aktualizacja
11.10.2026 10:22

Źródła i licencje

OSV / GitHub Advisory Database - GHSA-mj63-m3rc-8ppr - CC BY 4.0

Historia podatności: league/commonmark

Wszystkie opisane podatności tej paczki (Paczka Composer), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.

Wszystkie (18) w archiwum
Wszystkich wpisów
18
Pierwsza → ostatnia
09.2019 09.2026
Bez poprawki
0
Wykorzystywana w atakach
0

Rozkład istotności

  • Wysoka 10
  • Średnia 8

Ujawnienia w latach

  1. 2019: 1
  2. 2020: 0
  3. 2021: 0
  4. 2022: 1
  5. 2023: 0
  6. 2024: 1
  7. 2025: 1
  8. 2026: 14
Istotność:
  1. Wysoka · 7.5 CVE-2026-86429 >= 1.5.0, < 2.9.1 2.9.1
  2. league/commonmark: Denial of service via deeply nested XML output ten wpis
    Średnia · 5.3 ghsa-mj63-m3rc-8ppr >= 2.0.0, < 2.9.0 2.9.0
  3. Wysoka · 7.5 CVE-2026-86434 >= 2.0.0, < 2.9.0 2.9.0
  4. Wysoka · 7.5 ghsa-jfm3-95jq-q3rf >= 1.5.0, < 2.9.0 2.9.0
  5. Wysoka · 7.5 ghsa-g2gp-3wwq-f4ph >= 1.5.0, < 2.9.0 2.9.0
  6. Wysoka · 7.5 CVE-2026-71488 >= 0.6.0, < 2.9.0 2.9.0

Dowiedz się, które podatności dotyczą Twojej aplikacji

Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.

Podłącz swoją aplikację
Newsletter DockRay

Bezpieczeństwo aplikacji w Twojej skrzynce

Najważniejsze podatności, konkretne zalecenia i praktyczne wskazówki dla Twoich aplikacji. Wybierz technologie i śledź to, co ma znaczenie dla Twojego projektu.

  • Codzienne zestawienie nowych podatności, także krytycznych.
  • Powiadomienia o ważnych aktualizacjach.
  • Praktyczne porady o bezpieczeństwie i monitoringu aplikacji.

Pozostaw puste, aby otrzymywać informacje o wszystkich technologiach.

Zapis jest bezpłatny. Wypiszesz się jednym kliknięciem w wiadomości.