league/commonmark is vulnerable to Denial of Service (DoS)
75
CVE Score
High
Denial of Service (DoS)
The parser tracks locations by character position while regular-expression matches report byte positions, and several parsing paths repeatedly rescan growing portions of a line to translate between the two whenever the line contains a multibyte character. The Autolink extension similarly copies and revalidates the remaining line at every URL-like prefix. A single crafted line can drive quadratic time complexity, letting untrusted Markdown consume disproportionate CPU and memory and exhaust available workers. The fix records character-to-byte positions incrementally and matches autolinks against the original line so work grows in proportion to input size.
Upgrade the league/commonmark library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and you convert untrusted or externally influenced Markdown input. The core parser paths (CommonMarkConverter, GithubFlavoredMarkdownConverter, and custom environments) are reachable by default with no extension required; enabling the Autolink or GitHub-Flavored Markdown extension adds an additional trigger. Applications that only process trusted Markdown are not remotely exploitable.
0.6.0 - 2.8.3
Fixed in 2.9.0league/commonmark is vulnerable to Denial of Service (DoS) in versions 0.6.0 - 2.8.3.
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.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.