CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-39804

CVE-2026-39804: Remote Code Execution and DoS via Bandit WebSocket Permessage-Deflate Resource Exhaustion

Alon Barad
Alon Barad
Software Engineer

May 7, 2026·5 min read·84 visits

Executive Summary (TL;DR)

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.

Vulnerability Overview

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.

Root Cause Analysis

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.

Code Analysis

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
end

The 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}
end

This 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 and Attack Vector

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.

Impact Assessment

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.

Remediation and Mitigation

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.

Official Patches

mtrudelFix Commit implementing safe_inflate chunking.
GitHub Advisory DatabaseOfficial Security Advisory

Fix Analysis (1)

Technical Appendix

CVSS Score
8.2/ 10
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
EPSS Probability
0.04%
Top 88% most exploited

Affected Systems

Bandit HTTP Server (mtrudel/bandit)

Affected Versions Detail

Product
Affected Versions
Fixed Version
bandit
mtrudel
>= 0.5.9, < 1.11.01.11.0
AttributeDetail
CWE IDCWE-770
Attack VectorNetwork (Remote)
CVSS v4.0 Score8.2 (High)
EPSS Score0.0004 (11.83%)
Exploit StatusProof-of-Concept Available
ImpactDenial of Service (Node Crash)

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
CWE-770
Allocation of Resources Without Limits or Throttling

Allocation of Resources Without Limits or Throttling

Known Exploits & Detection

Test Suite PoCThe protocol_test.exs suite in the fix commit demonstrates the decompression bomb construction.

Vulnerability Timeline

Vulnerability identified and reported by Peter Ullrich
2026-04-27
Fix commit merged into main repository
2026-05-01
Public disclosure on CVE.org and GitHub Advisory Database
2026-05-01
NVD record updated with final CVSS scoring and analysis
2026-05-05

References & Sources

  • [1]GHSA-frh3-6pv6-rc8j Advisory
  • [2]CNA Advisory Entry
  • [3]OSV Entry

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-63349
7.0

CVE-2026-63349: Privilege Dropping Bypass and Denial of Service in AnyIO Subprocess Module

CVE-2026-63349 is a critical privilege-dropping bypass vulnerability in the AnyIO asynchronous framework (versions 4.14.0 and 4.14.1) on POSIX platforms. Due to a variable assignment typo, supplementary groups specified by the developer are not correctly propagated to the execution backend, resulting in subprocesses retaining the parent process's elevated supplementary group permissions.

Alon Barad
Alon Barad
5 views•5 min read
•about 2 hours ago•CVE-2026-63406
5.9

CVE-2026-63406: Information Disclosure via Insecure Telemetry and Hardcoded Credentials in AnyCable-Go

CVE-2026-63406 is an information disclosure vulnerability in AnyCable-go prior to version 1.6.15. The built-in telemetry client is enabled by default with a hardcoded public authentication token ('secret'). This client digests highly sensitive configuration parameters and command-line arguments, including JWT secrets and RPC secrets, into a stable SHA-256 fingerprint. This fingerprint is sent over public networks, exposing those administrative secrets to offline dictionary and brute-force attacks if intercepted.

Alon Barad
Alon Barad
4 views•5 min read
•about 3 hours ago•CVE-2026-84992
6.1

CVE-2026-84992: Cross-Site Scripting (XSS) via Fenced Code Block Parsing in md-editor-v3

CVE-2026-84992 is a Cross-Site Scripting (XSS) vulnerability affecting md-editor-v3 before version 6.5.4. It occurs because the fenced-code block language parser directly interpolates unescaped language metadata into unquoted HTML attributes inside the custom rendering callback. This bypasses the built-in XSSPlugin which runs during the parsing phase, before rendering.

Amit Schendel
Amit Schendel
7 views•6 min read
•about 4 hours ago•CVE-2026-81505
7.1

CVE-2026-81505: Broken Object Level Authorization (BOLA) in Convoy Webhook Source Retrieval

CVE-2026-81505 is a high-severity Broken Object Level Authorization (BOLA) / Insecure Direct Object Reference (IDOR) vulnerability in Convoy, a cloud-native webhooks gateway. In affected versions prior to 26.6.8, the single-item Source retrieval API endpoint authorizes project access but fails to confirm if the requested Source belongs to that specific project. This logical flaw allows authenticated users or project-scoped API key holders to bypass tenant isolation boundaries and retrieve unredacted, plaintext message broker credentials for Apache Kafka, Amazon SQS, RabbitMQ, and Google Cloud Pub/Sub belonging to other tenants. This issue is fully patched in version 26.6.8.

Amit Schendel
Amit Schendel
8 views•5 min read
•about 5 hours ago•CVE-2026-77339
5.1

CVE-2026-77339: Unauthenticated Remote Command Execution in Process Compose via DNS Rebinding

CVE-2026-77339 is a critical security vulnerability in Process Compose before version 1.120.0. The Model Context Protocol (MCP) Server-Sent Events (SSE) listener transport subsystem fails to validate the HTTP Host and Origin headers, and does not enforce authentication. This omissions expose local loopback listeners to DNS rebinding attacks orchestrated by malicious remote websites visited by developers, enabling unauthorized process control and arbitrary command execution.

Alon Barad
Alon Barad
8 views•6 min read
•about 6 hours ago•CVE-2026-77301
7.5

CVE-2026-77301: Uncontrolled Resource Allocation (Decompression Bomb) in adm-zip

CVE-2026-77301 is a critical uncontrolled resource allocation vulnerability in the popular Node.js library adm-zip (versions prior to 0.6.1). During ZIP decompression of asynchronous entries, the library trusts the uncompressed size metadata declared in the central directory headers. Because Node.js's streaming zlib API completely ignores the maxOutputLength configuration, a crafted ZIP archive (decompression bomb) causes the application to continually allocate resident memory buffers on the heap without limits, causing rapid memory exhaustion and a process-level Out-of-Memory (OOM) crash.

Alon Barad
Alon Barad
6 views•5 min read