{"vuln_id":"CVE-2026-39804","aliases":["GHSA-frh3-6pv6-rc8j"],"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.\n\nBandit.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.\n\nAn 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.\n\nThis 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.\n\nThis issue affects bandit: from 0.5.9 before 1.11.0.","published_at":"2026-05-01T21:16:16.853000Z","modified_at":"2026-11-20T05:18:54.833000Z","first_seen_at":"2026-11-21T19:15:46.188944Z","severity":"high","severity_source":"nvd","cvss_score":8.2,"cvss_vector":"CVSS:4.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","cwe":["CWE-770"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.00759,"epss_percentile":0.56212,"nvd_status":"Deferred","enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-39804"},"matched_alias":null,"items":[{"id":3107,"source":{"id":"nvd","name":"NVD CVE API 2.0"},"title":"CVE-2026-39804: Allocation of Resources Without Limits or Throttling vulnerability in mtrudel bandit allows unauthenticated remote denial of service via memory exhaustion when…","summary":"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.\n\nBandit.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.\n\nAn 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.\n\nThis 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.\n\nThis issue affects bandit: from 0.5.9 before 1.11.0.\n\nReferences:\nhttps://cna.erlef.org/cves/CVE-2026-39804.html\nhttps://github.com/mtrudel/bandit/commit/8156921a51e684a951221da7bc30a70a022f722e\nhttps://github.com/mtrudel/bandit/commit/da4027cff7d2b80319e76fe7a32f84beceec490a\nhttps://github.com/mtrudel/bandit/security/advisories/GHSA-frh3-6pv6-rc8j\nhttps://osv.dev/vulnerability/EEF-CVE-2026-39804\nhttps://github.com/mtrudel/bandit/security/advisories/GHSA-frh3-6pv6-rc8j","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-39804","published_at":"2026-05-01T21:16:16.853000Z","updated_at":"2026-11-20T05:18:54.833000Z","fetched_at":"2026-11-21T19:15:31.478716Z","severity":"high","cvss_score":8.2,"epss":0.00759,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":null,"vuln_id":"CVE-2026-39804","vuln_ids":["CVE-2026-39804","GHSA-FRH3-6PV6-RC8J"],"tags":["CWE-770"],"cluster_id":3122,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/3107","html":"https://vulnwatch.ve1ve2.com/item/3107"}}]}