<?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 - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/commonmark/</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:44 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/commonmark/feed.xml" rel="self" type="application/rss+xml"/><item><title>Quadratic-time Denial of Service in league/commonmark</title><link>https://feed.craftedsignal.io/briefs/2026-08-commonmark-dos/</link><pubDate>Thu, 06 Aug 2026 21:29:44 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-08-commonmark-dos/</guid><description>The league/commonmark library is susceptible to a denial of service vulnerability via crafted Markdown inputs that cause excessive CPU usage and resource exhaustion due to inefficient multibyte character processing.</description><content:encoded><![CDATA[<p>The league/commonmark library, a popular PHP Markdown parser, is vulnerable to a denial of service (DoS) flaw (CVE-2026-71488) due to quadratic time complexity during the parsing of specifically crafted Markdown lines. The library improperly handles the translation between character positions and byte positions when processing UTF-8 multibyte characters. By including a single non-ASCII character in a long line containing repeated punctuation or whitespace, an attacker triggers a rescan of the growing string, forcing the parser into an increasingly inefficient state.</p>
<p>Furthermore, the Autolink extension exhibits similar performance degradation by repeatedly copying and validating the remaining line for every URL-like prefix identified. This vulnerability affects versions 0.6.0 through 2.8.3, including standard <code>CommonMarkConverter</code> and <code>GithubFlavoredMarkdownConverter</code> instances. An attacker submitting maliciously crafted Markdown to a web application can consume disproportionate CPU and memory resources, leading to the exhaustion of PHP workers and service-wide denial of service. The vulnerability is limited to availability and does not permit data disclosure or unauthorized execution.</p>
<h2 id="impact">Impact</h2>
<p>Successful exploitation results in service unavailability by saturating PHP worker processes. Because the computationally expensive work occurs before HTML rendering, existing security configurations like <code>html_input</code> settings do not mitigate the issue. Applications processing untrusted Markdown from public users are at high risk. The complexity of the attack is low, as a single request containing a long, crafted line is sufficient to trigger the resource exhaustion, and no complex Markdown structure is required.</p>
<h2 id="recommendation">Recommendation</h2>
<p>Prioritized, concrete actions for detection engineering and development teams:</p>
<ul>
<li>Upgrade <code>league/commonmark</code> to version 2.9.0 or later immediately to resolve the underlying algorithmic flaw in character-to-byte position conversion.</li>
<li>Implement strict input validation to truncate or reject individual Markdown lines that exceed reasonable length limits before passing them to the parser.</li>
<li>Configure application-level request limits and rate limiting to prevent concurrent abuse of the parsing engine.</li>
<li>Apply PHP execution-time limits to ensure individual process requests cannot hang indefinitely during expensive parsing operations.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category></item></channel></rss>