Unbounded memory consumption in WebSocket client in hackney
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-400.
Summary
Allocation of Resources Without Limits or Throttling vulnerability in benoitc hackney allows Flooding. The WebSocket client in src/hackney_ws.erl imposes no upper bound on memory consumption in three code paths. First, read_handshake_response/3 accumulates received bytes into a growing buffer with no size cap; the per-receive timeout resets on every chunk, so a server that streams bytes without ever sending \r\n\r\n causes the buffer to grow until memory is exhausted. Second, parse_payload/9 and parse_active_payload/8 do not validate the declared frame payload length against any limit; because RFC 6455 allows payload lengths up to 2^63-1 bytes, a server that announces a very large frame and dribbles bytes causes the accumulation buffer to grow until OOM. Third, the frag_buffer field in #ws_data{} accumulates continuation frames indefinitely; a server that sends an endless stream of non-final (nofin) fragmented frames without ever sending a final (fin) frame grows frag_buffer without bound. In all three cases the attacker only needs to control the WebSocket server the hackney client connects to, with no authentication or special client configuration required. This issue affects hackney: from 2.0.0 before 4.0.1.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| benoitc | hackney | 2.0.0 to before 4.0.1 | 4.0.1 | Patch available | CNA |
| — | hackney (Hex) | 2.0.0 to before 4.0.1 | 4.0.1 | Patch available | GHSA-q8jg-fgj4-fphf |
- hackney Vendorbenoitc Affected 2.0.0 to before 4.0.1 Fixed in 4.0.1 Patch available CNA
- hackney (Hex) Vendor— Affected 2.0.0 to before 4.0.1 Fixed in 4.0.1 Patch available GHSA-q8jg-fgj4-fphf
Remediation
- Fix · CNA hackney (benoitc) Fixed in 4.0.1
- Fix · GHSA-q8jg-fgj4-fphf hackney (Hex) Fixed in 4.0.1 Advisory →
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Release ·
benoitc hackney 4.0.1
10 records Highest priority Priority HIGH 6 HIGH, 4 MEDIUM
Other records, highest priority first
- TI-2026-34669 Atom table exhaustion via unrecognized URL schemes in hackneyPriority HIGH 77
- TI-2026-34668 Infinite loop in Alt-Svc header parser in hackneyPriority HIGH 77
- TI-2026-34679 Unbounded body accumulation in HTTP/3 response loop in hackneyPriority HIGH 75
Timeline
- 2026-10-02 Threatist record created from CVE-2026-47073
- 2026-10-03 Alias added: GHSA-q8jg-fgj4-fphf
References
Patch 3
More benoitc Hackney vulnerabilities
- TI-2026-34669 Atom table exhaustion via unrecognized URL schemes in hackney CVSS 4.0HIGH 8.7
- TI-2026-34668 Infinite loop in Alt-Svc header parser in hackney CVSS 4.0HIGH 8.7
- TI-2026-34679 Unbounded body accumulation in HTTP/3 response loop in hackney CVSS 4.0HIGH 8.2
- TI-2026-34673 SOCKS5 TLS upgrade ignores caller timeout in hackney CVSS 4.0HIGH 8.2
- TI-2026-34674 CRLF injection in WebSocket upgrade request in hackney CVSS 4.0MEDIUM 6.9
- TI-2026-34678 SSRF allowlist bypass via percent-encoded host in hackney CVSS 4.0MEDIUM 6.9
Sources
- CVE-2026-47073 · CVE Program
- CVE-2026-47073 · NVD
- FIRST EPSS
- GHSA-q8jg-fgj4-fphf · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences