<?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.6.0, &lt; 1.11.1) — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/bandit--1.6.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:26:58 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/bandit--1.6.0--1.11.1/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></channel></rss>