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.
Published: 2026-07-24
Score: 8.7 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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 yet.

History

Fri, 24 Jul 2026 18:30:00 +0000

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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: EEF

Published:

Updated: 2026-07-25T04:16:42.726Z

Reserved: 2026-07-22T13:55:59.401Z

Link: CVE-2026-65623

cve-icon Vulnrichment

Updated: 2026-07-24T17:09:03.715Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-07-24T17:17:34.107

Modified: 2026-07-30T17:01:07.343

Link: CVE-2026-65623

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T20:00:13Z

Weaknesses
  • CWE-407

    Inefficient Algorithmic Complexity