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

High severity, published 2026-09-30. Update league/commonmark to 2.10.2 or later: composer update league/commonmark.

Canonical URL: https://buzzphp.com/security/ghsa-3q6v-r5mr-hxv8 · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | high (CVSS 7.5) |
| Published | 2026-09-30 |
| Updated | 2026-09-30 |
| GHSA | [GHSA-3q6v-r5mr-hxv8](https://github.com/advisories/GHSA-3q6v-r5mr-hxv8) |
| Weakness | CWE-400, CWE-407 |

| Package | Affected versions | Fixed in |
| --- | --- | --- |
| league/commonmark | >= 2.0.0, <= 2.10.1 | 2.10.2 |

## What to do

Update league/commonmark to 2.10.2 or later: composer update league/commonmark.

Check which version you run with `composer show league/commonmark`, and every affected package with `composer audit`.

## About this advisory

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

## Links

- [GHSA-3q6v-r5mr-hxv8 on GitHub](https://github.com/advisories/GHSA-3q6v-r5mr-hxv8)
- [All Composer security advisories](https://buzzphp.com/security)
