Intel

AIKIDO-2026-176089

league/commonmark is vulnerable to Denial of Service (DoS)

GHSA-mj63-m3rc-8pprPublished Aug 5, 2026
August 5, 2026

53

CVE Score

Medium

Denial of Service (DoS)

Are you affected? Scan for Free

TL;DR

The XML renderer pretty-prints output by emitting indentation whitespace proportional to each element's nesting depth for every opening and closing tag. For a deeply nested document tree the indentation alone sums to a quadratic number of bytes of output and memory. Converting untrusted Markdown to XML, such as a single line of deeply nested blockquotes, can amplify a small request into a very large response and exhaust memory. The fix caps indentation depth with a configurable maximum so output size grows in proportion to input.

How do I fix this?

Upgrade the league/commonmark library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you convert untrusted Markdown to XML output.

Versions

2.0.0 - 2.8.3

Fixed in 2.9.0

Background info

league/commonmark is vulnerable to Denial of Service (DoS) in versions 2.0.0 - 2.8.3.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea