CVE-2026-110314 PUBLISHED

WebSocket frames keep reaching the WebSock after a server-initiated close in Bandit

Assigner: EEF
Reserved: 23.10.2026 Published: 26.10.2026 Updated: 26.10.2026

Client-Side Enforcement of Server-Side Security vulnerability in the WebSocket connection handling of mtrudel bandit allows a remote client to keep running WebSock handler code after the server has stopped its connection, via data frames sent after ignoring the server's Close frame.

When a WebSock callback returns {:stop, ...}, Bandit.WebSocket.Connection calls terminate/2, sends Close and shuts down the write side, but keeps the connection process running in a :closing state. handle_frame/3 and handle_info/3 never check that state, so later frames still reach handle_in/2 and later messages reach handle_info/2, with the state from the stop tuple, until the client sends Close, TCP drops or the idle timeout fires. A client refused in init/1 after a failed token check could still run an admin-only action.

This issue affects bandit: from 0.5.1 before 1.14.0.

Metrics

CVSS Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
CVSS Score: 6.3

Product Status

Vendor mtrudel
Product bandit
Versions Default: unaffected
  • affected from 0.5.1 to 1.14.0 (excl.)
Vendor mtrudel
Product bandit
Versions Default: unaffected
  • affected from bb407f2277dcb65a58dd8cc07913a0b58a80e266 to 220b9dfd27f9a21305be2afc75cbe585ddc24e7a (excl.)

Workarounds

Mark the WebSock state as stopped whenever a callback returns {:stop, ...}, and have handle_in/2 and handle_info/2 return {:ok, state} without acting while that mark is set.

Credits

  • Peter Ullrich reporter
  • Mat Trudel remediation developer
  • Jonatan Männchen / EEF analyst

References

Problem Types

  • CWE-602 Client-Side Enforcement of Server-Side Security CWE

Impacts

  • A remote client that ignores the Close frame can keep invoking a WebSock application's handlers after the application refused or ended its session, bypassing an authorization check in init/1 or a kick or ban. This affects WebSock applications that rely on {:stop, ...} to end a session.