<?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 — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/bandit/</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:26:58 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/bandit/feed.xml" rel="self" type="application/rss+xml"/><item><title>Bandit HTTP/1 Chunked Request Trailer Denial of Service</title><link>https://feed.craftedsignal.io/briefs/2026-05-bandit-chunked-trailer-dos/</link><pubDate>Tue, 19 May 2026 19:26:58 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-bandit-chunked-trailer-dos/</guid><description>Bandit versions 1.6.0 through 1.11.0 are vulnerable to an unauthenticated denial-of-service (CVE-2026-39806) via a chunked request with trailers, where sending a request with `Transfer-Encoding: chunked` and a trailer field causes the connection's worker process to spin forever in an infinite recursion, exhausting the listener pool and rendering the server unresponsive.</description><content:encoded><![CDATA[<p>A worker-pinning denial-of-service vulnerability exists in Bandit&rsquo;s HTTP/1 chunked transfer decoder (CVE-2026-39806). The vulnerability affects Bandit versions 1.6.0 through 1.11.0. Any unauthenticated client sending a <code>Transfer-Encoding: chunked</code> request with a body ending with a trailer field causes the connection&rsquo;s worker process to become stuck in an infinite recursion. This occurs because the <code>do_read_chunked_data!/5</code> function in <code>lib/bandit/http1/socket.ex</code> does not properly handle trailer fields in chunked requests, leading to repeated calls to <code>read_available!/2</code> without progress. A small number of concurrent connections can exhaust the listener pool, rendering the server unresponsive to further traffic. The vulnerability was introduced with commit e73e379ab59840e8561b5730878f16e29ab06217 on December 6, 2024.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker sends an HTTP POST request to the vulnerable Bandit server.</li>
<li>The request includes the <code>Transfer-Encoding: chunked</code> header to indicate a chunked transfer encoding.</li>
<li>The request body consists of at least one data chunk followed by the last-chunk marker <code>0\r\n</code>.</li>
<li>The request body then includes a trailer field, such as <code>X-Trailer: value\r\n</code>, after the last chunk marker.</li>
<li>The request is terminated with <code>\r\n</code> to signal the end of the message.</li>
<li>The <code>do_read_chunked_data!/5</code> function in <code>lib/bandit/http1/socket.ex</code> attempts to parse the chunked data.</li>
<li>Due to the presence of the trailer field, the function fails to match the terminator clause and enters the <code>_ -&gt;</code> arm, leading to a negative <code>to_read</code> value and a call to <code>read_available!/2</code>.</li>
<li>The function tail-recurses with the same state, causing an infinite loop and pinning the worker process, ultimately leading to denial of service.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation results in an unauthenticated denial-of-service condition. A small number of attacker-controlled connections can exhaust the available worker pool, rendering the server unreachable for legitimate users. This impacts any Bandit-fronted HTTP/1 service that accepts chunked request bodies, including Phoenix and Plug applications. Servers behind proxies forwarding trailer-bearing requests are also vulnerable.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Apply the vendor-supplied patch to upgrade to Bandit version 1.11.1 or later, which resolves the vulnerability (reference: <a href="https://github.com/advisories/GHSA-rf5q-vwxw-gmrf)">https://github.com/advisories/GHSA-rf5q-vwxw-gmrf)</a>.</li>
<li>Deploy the Sigma rule <code>Detect Bandit Chunked Trailer DoS Attempt</code> to identify requests exploiting this vulnerability in your environment (reference: Sigma rule below).</li>
<li>Monitor web server logs for HTTP POST requests with <code>Transfer-Encoding: chunked</code> and trailer fields (reference: <code>webserver</code> log source).</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>denial-of-service</category><category>bandit</category><category>chunked-transfer-encoding</category></item><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>