Intel

AIKIDO-2026-676279

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

Denial of Service (DoS)GHSA-jjv6-8j6v-6j52 Published Aug 11, 2026

75

High Risk

This Affects:

PHPleague/commonmark
1.5.0 - 2.9.0
Fixed in 2.9.1
Are you affected? Scan for Free

TL;DR

The SmartPunctExtension and AttributesExtension contain quadratic parsing paths in unpaired-quote text merging, block-level attribute sibling scanning, and class-list rebuilding. Crafted Markdown with many apostrophes, adjacent attribute blocks, or repeated .class attributes forces repeated full copies or re-scans of continuously growing structures. Converting a small crafted input consumes disproportionate CPU time and can exhaust available workers while producing little or no output. The fix appends text in place, records already-walked attribute runs, and joins accumulated classes in a single pass.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you convert untrusted Markdown with the SmartPunctExtension or AttributesExtension registered.

Background info

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

How to fix this

Upgrade the league/commonmark library to the patch version.