CVE-2026-110314
WebSocket frames keep reaching the WebSock after a server-initiated close in Bandit
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
6.3
WebSocket frames keep reaching the WebSock after a server-initiated close in Bandit
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.
- Record
CVE-2026-110314- CVSS 4.0
- 6.3 Medium
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 - Weakness
- CWE-602
- Updated
- 2026-11-03
EUVDEUVD-2026-109822
6.3
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.
- Record
EUVD-2026-109822- CVSS 4.0
- 6.3 Medium
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 - Updated
- 2026-11-03
NVD
6.3
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.
- Record
CVE-2026-110314- CVSS 4.0
- 6.3 Medium
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Weakness
- CWE-602
- Updated
- 2026-11-03
OSV
6.3
WebSocket frames keep reaching the WebSock after a server-initiated close in Bandit
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.
- Record
CVE-2026-110314- CVSS 4.0
- 6.3 Medium
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 - Weakness
- CWE-602
- Updated
- 2026-11-04
OSVEEF-CVE-2026-110314
6.3
WebSocket frames keep reaching the WebSock after a server-initiated close in Bandit
Summary
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.
Details
1. Stop without close. In Bandit.WebSocket.Connection, do_stop/4 calls terminate/2, sends the Close frame and runs shutdown(:write). It then returns {:continue, %{connection | state: :closing}}, so Bandit.WebSocket.Handler keeps the process alive.
2. No state check. handle_frame/3 and handle_info/3 never check connection.state. Every later data frame still reaches handle_in/2, and every later message still reaches handle_info/2, with the state from the stop tuple.
3. Client-controlled lifetime. The connection ends only when the client sends Close, TCP drops, or the idle timeout fires, and each client frame resets that timeout. All stops through do_stop are affected: {:stop, :normal, ...}, {:stop, {:shutdown, :disconnected}, ...} and {:stop, {:shutdown, :restart}, ...}, which is what Phoenix's :socket_drain returns. A banned user who was kicked kept posting for longer than the idle timeout.
Proof of concept
- Serve a WebSock whose
init/1returns{:stop, :normal, {4401, "unauthorized"}, state}for a wrong token, and whosehandle_in/2runs an admin-onlydelete_all_usersaction whenuser_idisadmin. - Upgrade with
?user_id=admin&token=wrong. The server callsterminate/2and sends a Close frame with code 4401. - Ignore the Close frame and send a masked text frame
delete_all_users. handle_in/2runsdelete_all_usersasadmin.
Impact
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.
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.
- Record
EEF-CVE-2026-110314- CVSS 4.0
- 6.3 Medium
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 - Weakness
- CWE-602
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-110314
6.3
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.
- Record
UBUNTU-CVE-2026-110314- CVSS 4.0
- 6.3 Medium
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 - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
banditHex |
0.5.1 up to 1.14.0, plus listed versions 0.5.100.5.110.5.20.5.30.5.4 Show 45 moreShow less0.5.50.5.60.5.70.5.80.5.90.6.00.6.10.6.100.6.110.6.20.6.30.6.40.6.50.6.60.6.70.6.80.6.90.7.00.7.10.7.20.7.30.7.40.7.50.7.60.7.71.0.01.0.0-pre.11.0.0-pre.101.0.0-pre.111.0.0-pre.121.0.0-pre.131.0.0-pre.141.0.0-pre.151.0.0-pre.161.0.0-pre.171.0.0-pre.181.0.0-pre.21.0.0-pre.31.0.0-pre.41.0.0-pre.51.0.0-pre.61.0.0-pre.71.0.0-pre.81.0.0-pre.91.1.0 |
1.14.0 |
banditUbuntu:16.04:LTS |
All versions, plus listed versions 0.13.2-10.13.2-3 |
None known |
banditUbuntu:18.04:LTS |
All versions, plus listed versions 1.4.0-0ubuntu2 |
None known |
banditUbuntu:20.04:LTS |
All versions, plus listed versions 1.5.1-31.6.2-1 |
None known |
banditUbuntu:22.04:LTS |
All versions, plus listed versions 1.6.2-1 |
None known |
banditUbuntu:24.04:LTS |
All versions, plus listed versions 1.6.2-3 |
None known |
banditUbuntu:26.10 |
All versions, plus listed versions 1.7.10-31.9.4-1 |
None known |
banditUbuntu:26.04:LTS |
All versions, plus listed versions 1.7.10-21.7.10-3 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| facts | EUVD, OSV | |
| references | CVE List, NVD | |
| first indexed | CVE List, EUVD, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-110314 is a medium vulnerability (CVSS 6.3) in Mtrudel Bandit, published October 26, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.38%, the 32nd percentile. Fixed in bandit 1.14.0.
References
github.com/mtrudel/bandit/security/advisories/GHSA-2v5v-8f9v-xh85
cna.erlef.org/cves/CVE-2026-110314.html
osv.dev/vulnerability/EEF-CVE-2026-110314
github.com/mtrudel/bandit/commit/bb407f2277dcb65a58dd8cc07913a0b58a80e266
github.com/mtrudel/bandit/commit/220b9dfd27f9a21305be2afc75cbe585ddc24e7a
github.com
Show 12 moreShow less
repo.hex.pm
github.com/CVEProject/cvelistV5/tree/main/cves/2026/110xxx/CVE-2026-110314.json
nvd.nist.gov/vuln/detail/CVE-2026-110314
github.com/mtrudel/bandit
hex.pm/packages/bandit
ubuntu.com/security/CVE-2026-110314
cve.org/CVERecord?id=CVE-2026-110314
cna.erlef.org/cves/cve-2026-110314.html
github.com/mtrudel/bandit/security/advisories/ghsa-2v5v-8f9v-xh85
github.com/cveproject/cvelistv5/tree/main/cves/2026/110xxx/cve-2026-110314.json
nvd.nist.gov/vuln/detail/cve-2026-110314
osv.dev/vulnerability/eef-cve-2026-110314
Left out here: 49 versions. The JSON record has them.