CVE-2026-39804
WebSocket permessage-deflate inflate has no output-size cap in bandit
Description
Allocation of Resources Without Limits or Throttling vulnerability in mtrudel bandit allows unauthenticated remote denial of service via memory exhaustion when WebSocket permessage-deflate compression is enabled. Bandit.WebSocket.PerMessageDeflate.inflate/2 in lib/bandit/websocket/permessage_deflate.ex calls :zlib.inflate/2 with no output-size cap, then materializes the entire decompressed payload as a single binary via IO.iodata_to_binary/1. The websocket_options.max_frame_size option only bounds the on-the-wire (compressed) frame size, not the decompressed output. A high-ratio compressed frame (e.g. uniform data at ~1024:1 ratio) can stay well under any wire-size limit while forcing GiB-scale heap allocations in the connection process before any application code runs. An unauthenticated attacker who can open a WebSocket connection can send a single such frame to exhaust the BEAM node's memory and trigger an OOM kill. This vulnerability requires both Bandit's server-level websocket_options.compress and the per-upgrade compress: true option passed to WebSockAdapter.upgrade/4 to be enabled. Stock Phoenix and LiveView applications are not affected as they default to compress: false. This issue affects bandit: from 0.5.9 before 1.11.0.
INFO
Published Date :
May 1, 2026, 9:16 p.m.
Last Modified :
Nov. 20, 2026, 5:18 a.m.
Remotely Exploit :
Yes !
Source :
6b3ad84c-e1a6-4bf7-a703-f496b71e49db
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 4.0 | HIGH | 6b3ad84c-e1a6-4bf7-a703-f496b71e49db | ||||
| CVSS 4.0 | HIGH | 6b3ad84c-e1a6-4bf7-a703-f496b71e49db |
Solution
- Disable websocket_options.compress if not required.
- Ensure per-upgrade compress option is false.
- Update Bandit to version 1.11.0 or later.
- Monitor system memory usage.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-39804.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-39804 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-39804
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-39804 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-39804 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by 6b3ad84c-e1a6-4bf7-a703-f496b71e49db
Nov. 20, 2026
Action Type Old Value New Value Changed Description Allocation of Resources Without Limits or Throttling vulnerability in mtrudel bandit allows unauthenticated remote denial of service via memory exhaustion when WebSocket permessage-deflate compression is enabled. 'Elixir.Bandit.WebSocket.PerMessageDeflate':inflate/2 in lib/bandit/websocket/permessage_deflate.ex calls :zlib.inflate/2 with no output-size cap, then materializes the entire decompressed payload as a single binary via IO.iodata_to_binary/1. The websocket_options.max_frame_size option only bounds the on-the-wire (compressed) frame size, not the decompressed output. A high-ratio compressed frame (e.g. uniform data at ~1024:1 ratio) can stay well under any wire-size limit while forcing GiB-scale heap allocations in the connection process before any application code runs. An unauthenticated attacker who can open a WebSocket connection can send a single such frame to exhaust the BEAM node's memory and trigger an OOM kill. This vulnerability requires both Bandit's server-level websocket_options.compress and the per-upgrade compress: true option passed to WebSockAdapter.upgrade/4 to be enabled. Stock Phoenix and LiveView applications are not affected as they default to compress: false. This issue affects bandit: from 0.5.9 before 1.11.0. Allocation of Resources Without Limits or Throttling vulnerability in mtrudel bandit allows unauthenticated remote denial of service via memory exhaustion when WebSocket permessage-deflate compression is enabled. Bandit.WebSocket.PerMessageDeflate.inflate/2 in lib/bandit/websocket/permessage_deflate.ex calls :zlib.inflate/2 with no output-size cap, then materializes the entire decompressed payload as a single binary via IO.iodata_to_binary/1. The websocket_options.max_frame_size option only bounds the on-the-wire (compressed) frame size, not the decompressed output. A high-ratio compressed frame (e.g. uniform data at ~1024:1 ratio) can stay well under any wire-size limit while forcing GiB-scale heap allocations in the connection process before any application code runs. An unauthenticated attacker who can open a WebSocket connection can send a single such frame to exhaust the BEAM node's memory and trigger an OOM kill. This vulnerability requires both Bandit's server-level websocket_options.compress and the per-upgrade compress: true option passed to WebSockAdapter.upgrade/4 to be enabled. Stock Phoenix and LiveView applications are not affected as they default to compress: false. This issue affects bandit: from 0.5.9 before 1.11.0. Added Reference https://cna.erlef.org/cves/CVE-2026-39804.html Added Reference https://github.com/mtrudel/bandit/commit/8156921a51e684a951221da7bc30a70a022f722e Added Reference https://github.com/mtrudel/bandit/commit/da4027cff7d2b80319e76fe7a32f84beceec490a Added Reference https://github.com/mtrudel/bandit/security/advisories/GHSA-frh3-6pv6-rc8j Added Reference https://osv.dev/vulnerability/EEF-CVE-2026-39804 Removed Reference https://cna.erlef.org/cves/CVE-2026-39804.html Removed Reference https://github.com/mtrudel/bandit/commit/8156921a51e684a951221da7bc30a70a022f722e Removed Reference https://github.com/mtrudel/bandit/security/advisories/GHSA-frh3-6pv6-rc8j Removed Reference https://osv.dev/vulnerability/EEF-CVE-2026-39804 -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Nov. 20, 2026
Action Type Old Value New Value Added Reference https://github.com/mtrudel/bandit/security/advisories/GHSA-frh3-6pv6-rc8j Removed Reference https://github.com/mtrudel/bandit/security/advisories/GHSA-frh3-6pv6-rc8j -
CVE Translated by [email protected]
Oct. 26, 2026
Action Type Old Value New Value Added Translation Title: bandit de mtrudel, Description: Vulnerabilidad de asignación de recursos sin límites ni limitación en mtrudel bandit permite la denegación de servicio remota no autenticada a través del agotamiento de la memoria cuando la compresión WebSocket permessage-deflate está habilitada. ’Elixir.Bandit.WebSocket.PerMessageDeflate’:inflate/2 en lib/bandit/websocket/permessage_deflate.ex llama a :zlib.inflate/2 sin límite de tamaño de salida, luego materializa la carga útil descomprimida completa como un único binario a través de IO.iodata_to_binary/1. La opción websocket_options.max_frame_size solo limita el tamaño del marco en tránsito (comprimido), no la salida descomprimida. Un marco comprimido de alta relación (por ejemplo, datos uniformes con una relación de ~1024:1) puede permanecer muy por debajo de cualquier límite de tamaño de cable mientras fuerza asignaciones de pila a escala de GiB en el proceso de conexión antes de que se ejecute cualquier código de aplicación. Un atacante no autenticado que puede abrir una conexión WebSocket puede enviar un único marco de este tipo para agotar la memoria del nodo BEAM y activar una eliminación por OOM. Esta vulnerabilidad requiere que tanto la opción websocket_options.compress a nivel de servidor de Bandit como la opción compress: true por actualización pasada a WebSockAdapter.upgrade/4 estén habilitadas. Las aplicaciones estándar de Phoenix y LiveView no se ven afectadas ya que por defecto tienen compress: false. Este problema afecta a bandit: desde 0.5.9 antes de 1.11.0. -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Jun. 17, 2026
Action Type Old Value New Value Added SSVC {'id': 'CVE-2026-39804', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'poc'}, {'automatable': 'yes'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2026-05-02T01:19:00.687361Z'} -
CVE Modified by 6b3ad84c-e1a6-4bf7-a703-f496b71e49db
Jun. 17, 2026
Action Type Old Value New Value Added Affected [{'cpes': ['cpe:2.3:a:mtrudel:bandit:*:*:*:*:*:*:*:*'], 'repo': 'https://github.com/mtrudel/bandit', 'vendor': 'mtrudel', 'modules': ["'Elixir.Bandit.WebSocket.PerMessageDeflate'"], 'product': 'bandit', 'versions': [{'status': 'affected', 'version': '0.5.9', 'lessThan': '1.11.0', 'versionType': 'semver'}], 'packageURL': 'pkg:hex/bandit', 'packageName': 'bandit', 'programFiles': ['lib/bandit/websocket/permessage_deflate.ex'], 'collectionURL': 'https://repo.hex.pm', 'defaultStatus': 'unaffected', 'programRoutines': [{'name': "'Elixir.Bandit.WebSocket.PerMessageDeflate':inflate/2"}]}, {'cpes': ['cpe:2.3:a:mtrudel:bandit:*:*:*:*:*:*:*:*'], 'repo': 'https://github.com/mtrudel/bandit', 'vendor': 'mtrudel', 'modules': ["'Elixir.Bandit.WebSocket.PerMessageDeflate'"], 'product': 'bandit', 'versions': [{'status': 'affected', 'version': 'da4027cff7d2b80319e76fe7a32f84beceec490a', 'lessThan': '8156921a51e684a951221da7bc30a70a022f722e', 'versionType': 'git'}], 'packageURL': 'pkg:github/mtrudel/bandit', 'packageName': 'mtrudel/bandit', 'programFiles': ['lib/bandit/websocket/permessage_deflate.ex'], 'collectionURL': 'https://github.com', 'defaultStatus': 'unaffected', 'programRoutines': [{'name': "'Elixir.Bandit.WebSocket.PerMessageDeflate':inflate/2"}]}] -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
May. 02, 2026
Action Type Old Value New Value Added Reference https://github.com/mtrudel/bandit/security/advisories/GHSA-frh3-6pv6-rc8j -
New CVE Received by 6b3ad84c-e1a6-4bf7-a703-f496b71e49db
May. 01, 2026
Action Type Old Value New Value Added Description Allocation of Resources Without Limits or Throttling vulnerability in mtrudel bandit allows unauthenticated remote denial of service via memory exhaustion when WebSocket permessage-deflate compression is enabled. 'Elixir.Bandit.WebSocket.PerMessageDeflate':inflate/2 in lib/bandit/websocket/permessage_deflate.ex calls :zlib.inflate/2 with no output-size cap, then materializes the entire decompressed payload as a single binary via IO.iodata_to_binary/1. The websocket_options.max_frame_size option only bounds the on-the-wire (compressed) frame size, not the decompressed output. A high-ratio compressed frame (e.g. uniform data at ~1024:1 ratio) can stay well under any wire-size limit while forcing GiB-scale heap allocations in the connection process before any application code runs. An unauthenticated attacker who can open a WebSocket connection can send a single such frame to exhaust the BEAM node's memory and trigger an OOM kill. This vulnerability requires both Bandit's server-level websocket_options.compress and the per-upgrade compress: true option passed to WebSockAdapter.upgrade/4 to be enabled. Stock Phoenix and LiveView applications are not affected as they default to compress: false. This issue affects bandit: from 0.5.9 before 1.11.0. Added CVSS V4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/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 Added CWE CWE-770 Added Reference https://cna.erlef.org/cves/CVE-2026-39804.html Added Reference https://github.com/mtrudel/bandit/commit/8156921a51e684a951221da7bc30a70a022f722e Added Reference https://github.com/mtrudel/bandit/security/advisories/GHSA-frh3-6pv6-rc8j Added Reference https://osv.dev/vulnerability/EEF-CVE-2026-39804