# CVE-2026-39804: WebSocket permessage-deflate inflate has no output-size cap in bandit

- Severity: High 8.2 (CVSS:4.0, scored by EEF) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.72%, higher than 55% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-05-01T20:34:24.604Z
- Modified: 2026-11-25T17:23:06.319Z
- Also known as: GHSA-frh3-6pv6-rc8j, EEF-CVE-2026-39804
- Weaknesses: CWE-770
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: EEF

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

(As written by CVE List.)

## Affected

- bandit: from 0.5.9 before 1.11.0
- mtrudel/bandit: from da4027cff7d2b80319e76fe7a32f84beceec490a before 8156921a51e684a951221da7bc30a70a022f722e
- bandit (Hex): from 0.5.8 before 1.11.0; from 0.5.9 before 1.11.0
- https://github.com/mtrudel/bandit: from da4027cff7d2b80319e76fe7a32f84beceec490a before 8156921a51e684a951221da7bc30a70a022f722e

## Every score

- EEF: CVSS:4.0 8.2 High `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`
- GitHub: CVSS:4.0 High `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`
- Erlang Ecosystem Foundation: CVSS:4.0 `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`

## References

- <https://github.com/mtrudel/bandit/security/advisories/GHSA-frh3-6pv6-rc8j> (exploit, advisory, related, vendor-advisory, web)
- <https://cna.erlef.org/cves/CVE-2026-39804.html> (related, web)
- <https://osv.dev/vulnerability/EEF-CVE-2026-39804> (related, web)
- <https://github.com/mtrudel/bandit/commit/da4027cff7d2b80319e76fe7a32f84beceec490a> (related, web)
- <https://github.com/mtrudel/bandit/commit/8156921a51e684a951221da7bc30a70a022f722e> (fix, patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-39804> (advisory)
- <https://github.com/mtrudel/bandit> (package)
- <https://hex.pm/packages/bandit> (package)

## Sources

- CVE List: [CVE-2026-39804](https://www.cve.org/CVERecord?id=CVE-2026-39804), CVE Terms of Use, modified 2026-11-20
- GitHub Advisory Database: [GHSA-frh3-6pv6-rc8j](https://github.com/advisories/GHSA-frh3-6pv6-rc8j), CC-BY-4.0, modified 2026-05-07
- Erlang Ecosystem Foundation: [EEF-CVE-2026-39804](https://osv.dev/vulnerability/EEF-CVE-2026-39804), CC-BY-4.0, modified 2026-11-25
- NVD: [CVE-2026-39804](https://nvd.nist.gov/vuln/detail/CVE-2026-39804), Public domain, modified 2026-11-20

---

Page: https://cve.day/CVE-2026-39804 · Whole record: https://cve.day/CVE-2026-39804.json · Rebuilt by cve.day 2026-11-25T22:59:20.436Z
