CVE-2026-65623

Quadratic CPU blow-up reassembling fragmented WebSocket messages in Bandit

Published Jul 24, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
Description
Inefficient Algorithmic Complexity vulnerability in mtrudel bandit allows unauthenticated remote denial of service via CPU exhaustion during WebSocket fragment reassembly.

The size guard 'Elixir.Bandit.WebSocket.Connection':oversize_message?/2 called from handle_frame/3 in lib/bandit/websocket/connection.ex appends each non-final continuation frame to a left-nested iolist and then re-measures the entire accumulated buffer with IO.iodata_length/1 on every frame. Because the buffer grows by one element per frame and is fully re-traversed each time, reassembly work is quadratic (O(n^2)) in the number of continuation frames.

The max_fragmented_message_size limit (default 8 MB) bounds total bytes but not frame count, and each frame can carry as little as one payload byte, so an attacker can send millions of tiny continuation frames using modest bandwidth to pin a CPU core for minutes to hours. Many concurrent connections can starve the whole server of CPU, denying service to legitimate users. The WebSocket read timeout does not help, because it is an idle timeout evaluated between reads and cannot preempt the synchronous reassembly work spent inside a single callback.

This issue affects bandit: from 1.11.0 before 1.12.1.

Analysis

AI-generated

Technical impact

Bandit implements WebSocket fragment reassembly by appending each non‑final continuation frame to a nested iolist and then measuring the total buffer length with IO.iodata_length/1 on every frame. Because the buffer grows linearly with the number of frames and the entire buffer is traversed each time, the reassembly work grows quadratically (O(n²)) in the number of continuation frames. An unauthenticated attacker can send a huge number of tiny continuation frames, forcing the server to perform many nested traversals that exhaust CPU cycles. The result is a remote denial of service; legitimate clients experience long delays or disconnections while the server is pinned on the reassembly task for minutes to hours.

Affected Systems

The flaw affects Bandit version 1.11.0 through 1.12.0, all released under the mtrudel:bandit product. Version 1.12.1 and later contain the fix that removes the redundant traversal during fragment reassembly.

Risk and Exploitability

The CVSS score of 8.7 indicates high severity, while the EPSS score of less than 1 % reflects a very low current probability of exploitation. The vulnerability is not listed in the CISA KEV catalog. The attack vector is remote: an attacker opens a WebSocket connection to Bandit and transmits a very large number of continuation frames with small payloads. Because the reassembly logic is performed synchronously without an inter‑frame timeout, there is no automated interruption once the process starts. In an environment where Bandit serves many concurrent connections, a single malicious session can cause overall CPU starvation, leading to widespread server unavailability.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Bandit to version 1.12.1 or later, which removes the redundant traversal of the accumulated fragment buffer.
  • If an upgrade cannot be performed immediately, limit the number of concurrent WebSocket connections to the Bandit instance or implement application‑level rate limiting to restrict the rate of incoming frames.
  • Deploy a reverse proxy or firewall that rejects or drops fragmented WebSocket frames exceeding a configurable threshold, or that blocks connections after a high number of consecutive continuation frames.

Generated by OpenCVE AI on August 3, 2026 at 19:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Description Inefficient Algorithmic Complexity vulnerability in mtrudel bandit allows unauthenticated remote denial of service via CPU exhaustion during WebSocket fragment reassembly. The size guard 'Elixir.Bandit.WebSocket.Connection':oversize_message?/2 called from handle_frame/3 in lib/bandit/websocket/connection.ex appends each non-final continuation frame to a left-nested iolist and then re-measures the entire accumulated buffer with IO.iodata_length/1 on every frame. Because the buffer grows by one element per frame and is fully re-traversed each time, reassembly work is quadratic (O(n^2)) in the number of continuation frames. The max_fragmented_message_size limit (default 8 MB) bounds total bytes but not frame count, and each frame can carry as little as one payload byte, so an attacker can send millions of tiny continuation frames using modest bandwidth to pin a CPU core for minutes to hours. Many concurrent connections can starve the whole server of CPU, denying service to legitimate users. The WebSocket read timeout does not help, because it is an idle timeout evaluated between reads and cannot preempt the synchronous reassembly work spent inside a single callback. This issue affects bandit: from 1.11.0 before 1.12.1.
Title Quadratic CPU blow-up reassembling fragmented WebSocket messages in Bandit
First Time appeared Mtrudel
Mtrudel bandit
Weaknesses CWE-407
CPEs cpe:2.3:a:mtrudel:bandit:*:*:*:*:*:*:*:*
Vendors & Products Mtrudel
Mtrudel bandit
References
Metrics cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Weaknesses
  • CWE-407

    Inefficient Algorithmic Complexity

Sources

Status
PUBLISHED
Assigner
EEF
Published
Updated
Jul 25, 2026, 4:16 AM
Reserved
Jul 22, 2026, 1:55 PM
Status
Awaiting Analysis
Published
Jul 24, 2026, 5:17 PM
Modified
Oct 24, 2026, 1:10 PM