<?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>Re-Dos - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/re-dos/</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>Mon, 20 Jul 2026 21:35:48 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/re-dos/feed.xml" rel="self" type="application/rss+xml"/><item><title>Mistune Quadratic-Time Parsing Vulnerability in Formatting Plugins</title><link>https://feed.craftedsignal.io/briefs/2026-07-mistune-quadratic-redos/</link><pubDate>Mon, 20 Jul 2026 21:35:48 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-07-mistune-quadratic-redos/</guid><description>The mistune Python library, when used with the 'strikethrough', 'mark', or 'insert' plugins enabled, is vulnerable to an algorithmic-complexity denial-of-service (DoS) attack where an attacker can send specially crafted markdown input causing quadratic parsing time, leading to high CPU utilization and potential service outages.</description><content:encoded><![CDATA[<p>The mistune Python markdown parser library is susceptible to an algorithmic-complexity denial-of-service (DoS) vulnerability, tracked as CVE-2026-59922, when specific formatting plugins are enabled. This vulnerability impacts versions of mistune prior to 3.3.0. Attackers can exploit this by submitting specially crafted markdown input containing long, repeated sequences of <code>~~x~~</code>, <code>==x==</code>, or <code>^^x^^</code> markers, which are used for strikethrough, mark, and insert formatting respectively. The parsing process for these inputs exhibits quadratic time complexity (O(N²)), meaning the CPU time required quadruples when the input size doubles. This can cause applications using mistune to parse user-supplied markdown to experience severe CPU exhaustion, leading to significant performance degradation or complete service outages. While the affected plugins are not enabled by default, they are commonly activated in applications requiring GitHub-flavored Markdown or similar extensions.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker identifies an application using the <code>mistune</code> library to render user-supplied markdown content.</li>
<li>The application has one or more of the <code>strikethrough</code>, <code>mark</code>, or <code>insert</code> plugins enabled (e.g., <code>plugins=['strikethrough']</code>).</li>
<li>The attacker crafts a markdown payload, such as <code>~~x~~</code> repeated 8000 times (approximately 8 KB in size). Analogous payloads use <code>==x==</code> or <code>^^x^^</code>.</li>
<li>The attacker submits this specially crafted markdown payload to the vulnerable application.</li>
<li>The application invokes <code>mistune.create_markdown(...)(payload)</code> to process the input.</li>
<li>Due to the quadratic-time parsing logic for these specific markers, the application's CPU becomes heavily utilized; an 8 KB payload can peg the CPU for approximately 4 seconds, while a 16 KB payload extends this to about 17 seconds.</li>
<li>Repeated requests with such payloads can exhaust the application's worker pool, leading to a denial of service for legitimate users.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of CVE-2026-59922 results in a denial-of-service condition for applications relying on the mistune library with affected plugins. The primary impact is severe CPU exhaustion on the server, which can lead to application unresponsiveness, slow processing of legitimate requests, or complete service outages. An 8 KB malicious input can consume a single CPU core for roughly 4 seconds, while a 16 KB input extends this to 17 seconds, and 32 KB to 70 seconds. This predictable quadratic scaling means that even small, unauthenticated requests can significantly degrade or halt service, particularly in single-threaded environments or when attacker requests overwhelm thread pools. There is no significant memory growth observed, but the pure CPU cost can effectively render the application unusable.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade the <code>mistune</code> Python package to version 3.3.0 or later to patch CVE-2026-59922, as described in the affected_products section.</li>
<li>If immediate patching is not possible, review application configurations to determine if the <code>strikethrough</code>, <code>mark</code>, or <code>insert</code> plugins are enabled. Consider disabling these plugins if they are not critical for your application's functionality.</li>
</ul>
]]></content:encoded><category domain="severity">low</category><category domain="type">advisory</category><category>denial-of-service</category><category>re-dos</category><category>python</category><category>library-vulnerability</category></item></channel></rss>