BuzzPHP
LightDarkSystem

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

High severity. Published 30 September 2026. Update league/commonmark to 2.10.2 or later: composer update league/commonmark.

Which versions are affected?

PackageAffected versionsFixed in
league/commonmark (opens in a new tab)>= 2.0.0, <= 2.10.12.10.2

What should you do?

Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:

composer show league/commonmark
composer audit

Advisory details

SeverityHighCVSS 7.5
Published
Updated
GHSAGHSA-3q6v-r5mr-hxv8 (opens in a new tab)
WeaknessCWE-400, CWE-407

What the advisory says

Summary

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).

Source: GHSA-3q6v-r5mr-hxv8 (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .

Other recent advisories for this package

All Composer security advisories