<?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>Bandit (&gt;= 1.4.0, &lt; 1.11.1) — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/bandit--1.4.0--1.11.1/</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>Tue, 19 May 2026 19:25:16 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/bandit--1.4.0--1.11.1/feed.xml" rel="self" type="application/rss+xml"/><item><title>Bandit HTTP/1 Chunked Request DoS Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2026-05-bandit-chunked-dos/</link><pubDate>Tue, 19 May 2026 19:25:16 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-bandit-chunked-dos/</guid><description>Bandit's HTTP/1 chunked-body reader silently drops the request size cap, leading to excessive memory buffering. An unauthenticated attacker can crash Bandit-fronted Phoenix/Plug applications by sending a single 'Transfer-Encoding: chunked' request to any URL, causing BEAM memory exhaustion and a denial-of-service.</description><content:encoded><![CDATA[<p>A denial-of-service vulnerability exists in the Bandit HTTP/1 chunked-body reader. This vulnerability, discovered in May 2026, stems from the reader not respecting the configured request size cap (e.g., Plug.Parsers&rsquo; default 8 MB length). An attacker can exploit this vulnerability by sending a single, unauthenticated <code>Transfer-Encoding: chunked</code> request to any URL of a Bandit-fronted Phoenix/Plug application. Due to the lack of size limiting in <code>lib/bandit/http1/socket.ex</code>, the entire request body is buffered in memory, leading to BEAM out-of-memory (OOM) errors, effectively crashing the server. This issue impacts Bandit versions 1.4.0 through 1.11.0 and poses a significant risk to Phoenix applications using Bandit as their web server.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker sends an HTTP POST request to any endpoint on a Bandit-fronted Phoenix application.</li>
<li>The request includes the header <code>Transfer-Encoding: chunked</code> to trigger the vulnerable chunked-body reader in Bandit.</li>
<li>The request also sets <code>Content-Type</code> to a type handled by <code>Plug.Parsers</code> (e.g., <code>application/json</code>).</li>
<li>Bandit&rsquo;s <code>read_data/2</code> function in <code>lib/bandit/http1/socket.ex</code> is invoked to handle the chunked request body.</li>
<li>The <code>read_data/2</code> function calls <code>do_read_chunked_data!/5</code>, but omits the configured <code>:length</code> cap.</li>
<li>The <code>do_read_chunked_data!/5</code> function recursively accumulates all chunks into an iolist.</li>
<li><code>IO.iodata_to_binary/1</code> then materializes the entire iolist as a single binary in memory.</li>
<li>The BEAM process exhausts its memory, leading to an out-of-memory error and crashing the server, resulting in a denial of service.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>This vulnerability enables an unauthenticated pre-route denial-of-service attack via BEAM memory exhaustion. A single request from a single connection is sufficient to crash the server. This affects nearly every Phoenix application using Bandit, as <code>Plug.Parsers</code> is typically mounted ahead of routing and authentication, and the configured <code>length:</code> caps are ineffective on the chunked path. This can lead to significant service disruptions and downtime.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule <code>Detect Bandit Chunked Request DoS Attempt</code> to your SIEM to detect suspicious chunked requests.</li>
<li>Upgrade to Bandit version 1.11.1 or later to patch CVE-2026-39803.</li>
<li>Monitor network traffic for abnormally large chunked requests originating from single source IPs.</li>
<li>Review and adjust memory limits on your BEAM processes to mitigate the impact of potential memory exhaustion attacks.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>dos</category><category>vulnerability</category><category>bandit</category></item></channel></rss>