CVE-2026-47072
published 2026-05-25CVE-2026-47072: Improper Neutralization of CRLF Sequences ('CRLF Injection') vulnerability in benoitc hackney allows HTTP Request/Response Splitting. The WebSocket upgrade…
PriorityP348high7.5CVSS 3.1
AVNACLPRNUINSUCNIHAN
EPSS
0.51%
40.2th percentile
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.
Affected
4 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| benoitc | hackney | >= 2.0.0 < 4.0.1 | 4.0.1 |
| benoitc | hackney | >= 2.0.0 < 4.0.1 | 4.0.1 |
| benoitc | hackney | >= 2.0.0 < 4.0.1 | 4.0.1 |
| benoitc | hackney | >= 690cecaf236fba49526da404a5bc889a24367a3e < 52310ca807e7b48441ba0e9129171f535313fdd1 | 52310ca807e7b48441ba0e9129171f535313fdd1 |
CVSS provenance
nvdv3.17.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
nvdv4.06.9MEDIUMCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:H/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
cvelistv5v4.06.9MEDIUMCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:H/SA:N
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
Hackney has CRLF / header injection in WebSocket upgrade request
ghsa·2026-06-26
CVE-2026-47072 [MEDIUM] CWE-93 Hackney has CRLF / header injection in WebSocket upgrade request
Hackney has CRLF / header injection in WebSocket upgrade request
### Summary
CRLF injection in hackney's WebSocket upgrade request builder (`src/hackney_ws.erl`). `init/1` copies the `host`, `path`, `headers`, and `protocols` options from the caller-supplied opts map verbatim into `#ws_data{}`, and `do_handshake/1` splices them directly into the raw HTTP/1.1 upgrade request by binary concatenation with no `\r\n` or `\0` stripping. A caller that passes any of these fields from untrusted input can inject arbitrary header lines into the outbound upgrade request.
### Details
`do_handshake/1` builds the upgrade request at several concatenation sites:
- **Host header** (lines 583–590): the host binary is written straight into `Host: :\r\n`.
- **Sec-WebSocket-Protocol** (lines 601–602): prot
VulDB
benoitc hackney up to 4.0.0 URL src/hackney_ws.erl crlf injection (EUVD-2026-31690)
vuldb·2026-05-25
CVE-2026-47072 [LOW] benoitc hackney up to 4.0.0 URL src/hackney_ws.erl crlf injection (EUVD-2026-31690)
A vulnerability identified as problematic has been detected in benoitc hackney up to 4.0.0. This affects an unknown part of the file src/hackney_ws.erl of the component URL Handler. This manipulation causes crlf injection.
This vulnerability is handled as CVE-2026-47072. The attack can be initiated remotely. There is not any exploit available.
You should upgrade the affected component.
CVEList
CRLF injection in WebSocket upgrade request in hackney
cvelistv5·2026-05-25·CVSS 6.9
CVE-2026-47072 [MEDIUM] CWE-93 CRLF injection in WebSocket upgrade request in hackney
CRLF injection in WebSocket upgrade request in hackney
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 upgr
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://cna.erlef.org/cves/CVE-2026-47072.htmlhttps://github.com/benoitc/hackney/commit/52310ca807e7b48441ba0e9129171f535313fdd1https://github.com/benoitc/hackney/security/advisories/GHSA-f9vr-g2g2-x9fghttps://osv.dev/vulnerability/EEF-CVE-2026-47072https://github.com/benoitc/hackney/security/advisories/GHSA-f9vr-g2g2-x9fg
2026-05-25
Published