<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Commonmark (&gt;= 2.0.0, &lt; 2.9.0) - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/commonmark--2.0.0--2.9.0/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Thu, 06 Aug 2026 21:29:30 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/commonmark--2.0.0--2.9.0/feed.xml" rel="self" type="application/rss+xml"/><item><title>Algorithmic Complexity Denial of Service in league/commonmark</title><link>https://feed.craftedsignal.io/briefs/2026-08-league-commonmark-dos/</link><pubDate>Thu, 06 Aug 2026 21:29:30 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-08-league-commonmark-dos/</guid><description>A quadratic time complexity vulnerability in the UniqueSlugNormalizer component of league/commonmark 2.x allows attackers to trigger CPU exhaustion via specially crafted Markdown documents.</description><content:encoded><![CDATA[<p>The league/commonmark library, specifically versions 2.0.0 through 2.8.x, contains an algorithmic complexity vulnerability (CVE-2025-27144) within its <code>UniqueSlugNormalizer</code> component. This component is designed to ensure document-unique heading anchors by appending numeric suffixes to duplicate slugs. However, the implementation resets the search for an unused suffix to index '1' upon every collision. Consequently, processing K colliding slugs results in O(K²) time complexity.</p>
<p>An attacker can exploit this by submitting a Markdown document containing a large number of headings that normalize to the same slug (e.g., identical text, empty headings, or punctuation-only strings). When parsed by applications utilizing extensions such as <code>HeadingPermalinkExtension</code>, <code>FootnoteExtension</code>, or <code>TableOfContentsExtension</code> with the default <code>PER_DOCUMENT</code> uniqueness setting, the processor consumes excessive CPU cycles, leading to a denial-of-service condition. Because this behavior occurs during the standard parsing process and requires no authentication, it poses a significant availability risk for web applications that render user-provided Markdown.</p>
<h2 id="impact">Impact</h2>
<p>Successful exploitation results in CPU exhaustion, rendering the affected application unresponsive or significantly degraded. The vulnerability affects any service processing untrusted Markdown input using vulnerable versions of <code>league/commonmark</code>. The scale of the impact depends on the configured document size limits; however, even moderately sized inputs can trigger multi-second stalls on a single thread.</p>
<h2 id="recommendation">Recommendation</h2>
<p>Prioritize upgrading <code>league/commonmark</code> to version 2.9.0 or later, which resolves the quadratic behavior. If an immediate upgrade is not feasible, apply one of the following mitigations:</p>
<ul>
<li>Set the <code>slug_normalizer/unique</code> configuration to <code>false</code> (or <code>UniqueSlugNormalizerInterface::DISABLED</code>) to stop the de-duplication scan.</li>
<li>Disable the <code>HeadingPermalinkExtension</code>, <code>TableOfContentsExtension</code>, and <code>FootnoteExtension</code> when processing untrusted input.</li>
<li>Implement strict upstream constraints on document size or the number of headings allowed in a single input to prevent reaching the threshold where O(K²) complexity becomes destructive.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>denial-of-service</category><category>algorithmic-complexity</category><category>vulnerability</category></item></channel></rss>