May 7, 2026·5 min read·125 visits
Unauthenticated remote attackers can trigger a Denial of Service (OOM crash) in the Bandit web server by sending a highly compressed WebSocket frame, exhausting BEAM memory if `permessage-deflate` is enabled.
CVE-2026-39804 is a critical resource exhaustion vulnerability (CWE-770) affecting the Bandit Elixir HTTP server. By exploiting unbounded DEFLATE decompression in WebSocket frames, an unauthenticated attacker can crash the Erlang VM (BEAM) via a highly compressed decompression bomb.
Bandit is an HTTP server written in Elixir, designed to support modern web protocols including WebSockets. The server implements the permessage-deflate extension, which allows clients and servers to compress WebSocket frames to reduce bandwidth usage.
CVE-2026-39804 is a resource exhaustion vulnerability within this decompression implementation. The vulnerability triggers an Out-of-Memory (OOM) condition in the underlying Erlang Virtual Machine (BEAM) node when processing malicious inputs.
The flaw originates from unbounded memory allocation during the inflation of highly compressed data streams. Because the server does not enforce a maximum expansion ratio, a small input payload can consume gigabytes of heap memory before application-level size limits are checked.
The vulnerability exists within the inflate/2 function located in lib/bandit/websocket/permessage_deflate.ex. The root cause is the reliance on the unbounded :zlib.inflate/2 Erlang function for decompressing data streams.
When a client sends a compressed WebSocket frame, the Bandit server passes the payload directly to :zlib.inflate/2. This function processes the entire compressed input continuously, holding the uncompressed result in memory without enforcing any limits on the output size.
The DEFLATE algorithm can achieve extreme compression ratios, up to 1024:1 for highly repetitive data. An attacker can craft a 6 MiB payload consisting entirely of null bytes or repeating sequences that expands exponentially.
Bandit enforced a websocket_options.max_frame_size limit, but this setting only applied to the compressed, on-the-wire frame size. The application-level checks evaluate the frame size prior to decompression, allowing the highly compressed payload to bypass existing safeguards and expand to over 6 GiB in memory.
In versions prior to 1.11.0, the inflate/2 function utilized :zlib.inflate/2 followed by a direct conversion to binary via IO.iodata_to_binary/1. This logic materializes the entire uncompressed stream as a single contiguous binary on the BEAM heap.
# Vulnerable implementation
def inflate(data, %__MODULE__{} = context) do
inflated_data =
context.inflate_context
|> :zlib.inflate(<<data::binary, 0x00, 0x00, 0xFF, 0xFF>>)
|> IO.iodata_to_binary()
# Further processing
endThe patch implemented in commit 8156921a51e684a951221da7bc30a70a022f722e replaces this unbounded function with :zlib.safeInflate/2 and introduces a chunked processing loop. The implementation enforces a max_inflate_ratio parameter, defaulting to a 25:1 limit.
# Patched implementation
defp safe_inflate(inflate_context, {:continue, deflated}, buffer, bytes_remaining)
when bytes_remaining > 0 do
safe_inflate(
inflate_context,
:zlib.safeInflate(inflate_context, <<>>),
[buffer | deflated],
bytes_remaining - IO.iodata_length(deflated)
)
end
defp safe_inflate(_inflate_context, {:continue, _deflated}, _buffer, bytes_remaining)
when bytes_remaining <= 0 do
{:error, :too_much_inflation}
endThis recursive function evaluates the decompressed chunk size against bytes_remaining. If the cumulative uncompressed length exceeds byte_size(compressed_data) * max_inflate_ratio, the function returns an error tuple. The server subsequently terminates the connection with WebSocket status code 1009 (Message Too Big).
Exploitation requires an established WebSocket connection with the permessage-deflate extension negotiated during the initial HTTP upgrade handshake. The target server must be configured with compress: true for the WebSocket handler.
The attacker begins by constructing a decompression bomb. They generate a multi-megabyte stream of highly repetitive characters and compress it using standard DEFLATE algorithms. The resulting payload size is intentionally kept below the server's maximum frame size limit to ensure it is accepted by the initial packet handler.
The attacker transmits this compressed frame over the active WebSocket channel. The Bandit server receives the frame and attempts to inflate it entirely in memory. The process immediately requests massive memory allocation from the BEAM.
The official test suite provides an operational proof-of-concept. It uses :zlib.deflate to compress 1,000,000 ten-byte strings of repeating characters. When transmitted to a vulnerable server, this payload expands drastically and triggers the memory exhaustion condition.
The successful exploitation of CVE-2026-39804 results in a severe Denial of Service (DoS). The vulnerability forces the Erlang VM to perform a massive contiguous memory allocation, which generally exceeds system memory or container limits.
When the memory limit is breached, the operating system's OOM killer terminates the entire BEAM node. This crash halts all active connections, background jobs, and application state hosted within that Erlang instance.
The vulnerability carries a CVSS v4.0 base score of 8.2 (High). The impact is strictly confined to availability (VA:H), with no compromise of confidentiality or integrity. The attack requires no authentication and utilizes a low-complexity network vector (AV:N/AC:L).
Despite the high severity, the Exploit Prediction Scoring System (EPSS) assigns this vulnerability a low probability of exploitation (0.04%). This score reflects the conditional requirement that developers must explicitly opt into the vulnerable configuration by setting compress: true.
System administrators and developers must upgrade the bandit dependency to version 1.11.0 or later. This release introduces the max_inflate_ratio configuration and implements the chunked decompression logic to prevent memory exhaustion.
If immediate upgrading is not feasible, organizations can apply a configuration workaround. Disabling WebSocket compression fully mitigates the vulnerability. Administrators must set compress: false within the server configuration and omit the compress: true parameter when calling WebSockAdapter.upgrade/4.
Applications built on standard Phoenix and LiveView configurations remain unaffected by default. The default compress: false setting in these frameworks prevents the negotiation of the permessage-deflate extension.
Post-upgrade, security teams should monitor application logs for the {:error, :too_much_inflation} event. This log entry serves as a reliable indicator of active exploitation attempts or misconfigured clients sending anomalous data.
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N| Product | Affected Versions | Fixed Version |
|---|---|---|
bandit mtrudel | >= 0.5.9, < 1.11.0 | 1.11.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-770 |
| Attack Vector | Network (Remote) |
| CVSS v4.0 Score | 8.2 (High) |
| EPSS Score | 0.0004 (11.83%) |
| Exploit Status | Proof-of-Concept Available |
| Impact | Denial of Service (Node Crash) |
Allocation of Resources Without Limits or Throttling
CVE-2026-114151 is a high-severity remote code execution vulnerability affecting Microsoft Visual Studio 2026 and multiple supported versions of the Microsoft .NET runtime on Windows. The flaw resides in the native Debug Information Access (DIA) symbol reader component, Microsoft.DiaSymReader.Native. When parsing Program Database (.pdb) files, the component fails to validate the length of serialized numeric records (specifically LF_DECIMAL structures) before unpacking them into a fixed-size stack buffer. An attacker who convinces a user or automated diagnostic process to load a crafted .pdb file can trigger a stack-based buffer overflow, resulting in arbitrary code execution within the context of the host process.
CVE-2026-105544 is a high-severity local elevation of privilege vulnerability in Microsoft .NET and Microsoft.TestPlatform.CLI. Improper access control on local inter-process communication mechanisms and execution brokers allows an authorized local attacker to cross security boundaries and execute arbitrary code in the context of a higher-privileged user running a test execution cycle.
CVE-2026-114152 is a high-severity remote code execution vulnerability affecting Microsoft Visual Studio 2026 and multiple servicing branches of the Microsoft .NET runtime (.NET 8.0, 9.0, 10.0, and 11.0) on Windows platforms. The vulnerability exists within the native symbol reader library, Microsoft.DiaSymReader.Native, specifically inside the DiaObjectFile::ApplyFixup method during the processing of Common Object File Format (COFF) relocation records. By supplying a malformed object file or Program Database (PDB) symbol file containing out-of-bounds relocation offsets or invalid symbol table indices, an unauthenticated attacker can trigger an untrusted pointer dereference (CWE-822) and a stack-based buffer overflow (CWE-121). Successful exploitation occurs when a victim opens, compiles, or debugs a malicious project or symbol artifact, leading to arbitrary code execution within the security context of the active developer environment or build process.
CVE-2026-118745 is a high-severity remote code execution vulnerability affecting Microsoft Visual Studio 2026 and multiple supported versions of the .NET runtime (8.0, 9.0, 10.0, and 11.0) on Windows systems. The flaw is a heap-based buffer overflow (CWE-122) located within the native symbol reading library, Microsoft.DiaSymReader.Native, specifically in the routines responsible for extracting and parsing Program Database (.pdb) line number metadata. An attacker can exploit this vulnerability by supplying a crafted .pdb file alongside a repository, project, or compiled binary. When a developer or automated diagnostic process parses the malformed debug symbols, an out-of-bounds heap write occurs, permitting arbitrary code execution within the security context of the active user process.
CVE-2026-109481 is a high-severity Cross-Site Request Forgery (CSRF) vulnerability in the ASP.NET Core Blazor Server and interactive component architecture. The flaw exists within the internal circuit state synchronization endpoint (`/_blazor/refresh`), which fails to enforce antiforgery token validation or verify cross-origin request headers. By inducing an authenticated victim to issue a cross-site request targeting a pre-allocated circuit identifier, an unauthenticated attacker can bind the victim's security principal to the attacker's active SignalR circuit, resulting in full privilege elevation within the application scope.
A critical deserialization vulnerability exists in React Server Components (RSC) packages (`react-server-dom-webpack`, `react-server-dom-parcel`, and `react-server-dom-turbopack`) across versions 19.0.0 through 19.3.0. The flaw occurs during the processing of React Flight protocol streams when handling multiple typed arrays sharing a backing ArrayBuffer alongside attacker-controlled inputs. By combining byte-stream buffer detachment semantics with unvalidated thenable invocation and exposed internal response states, an unauthenticated attacker can achieve remote code execution on server runtimes supporting React Server Components.