Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. league/commonmark
  4. ›
  5. GHSA-3q6v-r5mr-hxv8

GHSA-3q6v-r5mr-hxv8: league/commonmark: Quadratic-time denial of service in the GitHub Flavored Markdown Table extension block-start scan

September 30, 2026

league/commonmark’s GitHub Flavored Markdown Table extension registers TableStartParser as a block-start parser. While a paragraph is the active block, the core block parser calls TableStartParser::tryStart() on every non-blank line. Its first action fetches the entire growing paragraph buffer via getParagraphContent() and runs strpos($paragraph, '|') across all of it. For a paragraph of M pipe-free lines, line k rescans about k lines of buffer, so total work is 1+2+…+M, which is O(M^2). An unauthenticated user who submits a single large paragraph of pipe-free lines that do not begin with a letter (see Attack Chain) to any service that converts untrusted Markdown with GithubFlavoredMarkdownConverter (or any environment that enables TableExtension) drives seconds to tens of seconds of single-core CPU that grows quadratically with body size, enough to exhaust worker processes and deny service.

References

  • github.com/advisories/GHSA-3q6v-r5mr-hxv8
  • github.com/thephpleague/commonmark/commit/5f63680a5e29dd57f9c6be9743b0e90493d3c2d0
  • github.com/thephpleague/commonmark/releases/tag/2.10.2
  • github.com/thephpleague/commonmark/security/advisories/GHSA-3q6v-r5mr-hxv8

Code Behaviors & Features

Detect and mitigate GHSA-3q6v-r5mr-hxv8 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 2.0.0 before 2.10.2

Fixed versions

  • 2.10.2

Solution

Upgrade to version 2.10.2 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-400: Uncontrolled Resource Consumption
  • CWE-407: Inefficient Algorithmic Complexity

Source file

packagist/league/commonmark/GHSA-3q6v-r5mr-hxv8.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 07 Oct 2026 12:18:48 +0000.