CRLF injection in WebSocket upgrade request in hackney
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- —
- Confidentiality · integrity · availability
- None · Low · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub.
Summary
Improper Neutralization of CRLF Sequences ('CRLF Injection') vulnerability in benoitc hackney allows HTTP Request/Response Splitting. The WebSocket upgrade code in src/hackney_ws.erl copies the host, path, headers (ExtraHeaders), and protocols options from the caller-supplied opts map into the internal #ws_data{} record in init/1 and then splices them verbatim into the raw HTTP/1.1 upgrade request by binary concatenation in do_handshake/1. No CRLF or NUL stripping is performed at any of these four injection sites. An attacker who controls any of these options — for example by forwarding URL components or header values from untrusted input into hackney_ws:start_link/1 — can inject arbitrary HTTP headers into the outbound WebSocket upgrade request, leading to header injection, credential spoofing toward the upstream server, log and cache poisoning, or request smuggling via intermediary proxies. 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-f9vr-g2g2-x9fg |
- 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-f9vr-g2g2-x9fg
Remediation
- Fix · CNA hackney (benoitc) Fixed in 4.0.1
- Fix · GHSA-f9vr-g2g2-x9fg 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-34675 Unbounded memory consumption in WebSocket client in hackneyPriority HIGH 77
- 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
Timeline
- 2026-10-02 Threatist record created from CVE-2026-47072
- 2026-10-03 Alias added: GHSA-f9vr-g2g2-x9fg
References
Patch 3
More benoitc Hackney vulnerabilities
- TI-2026-34675 Unbounded memory consumption in WebSocket client in hackney CVSS 4.0HIGH 8.7
- 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-34678 SSRF allowlist bypass via percent-encoded host in hackney CVSS 4.0MEDIUM 6.9
Sources
- CVE-2026-47072 · CVE Program
- CVE-2026-47072 · NVD
- FIRST EPSS
- GHSA-f9vr-g2g2-x9fg · 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