Intel

AIKIDO-2026-849032

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

GHSA-mh25-x5hq-wrqpPublished Aug 5, 2026
August 5, 2026

75

CVE Score

High

Denial of Service (DoS)

Are you affected? Scan for Free

TL;DR

The unique slug normalizer makes each heading slug document-unique by searching for an unused numeric suffix but restarts that search from the first suffix on every collision. When many headings or inline footnote labels normalize to the same base slug, deduplicating them costs quadratic time. Untrusted Markdown with many empty or identically normalizing headings can therefore burn seconds of CPU and deny service. The fix tracks suffix state so slug deduplication runs in linear time while preserving unique identifiers.

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 use the Heading Permalink, Table of Contents, or Footnote extension to render untrusted Markdown input.

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