# CVE-2026-47072: Benoitc hackney CRLF injection in WebSocket upgrade request

Source: https://junglewise.ai/threats/cve-2026-47072-benoitc-hackney-crlf-injection-in-websocket-upgrade-request  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-25. Updated: 2026-06-26  
License: CC BY 4.0 with a link back

CVE-2026-47072 · Severity: medium · CVSS 6.9 · Published 2026-05-25

Hackney, a popular Erlang HTTP client, is vulnerable to a security flaw when initiating WebSocket connections. An attacker can inject malicious commands or headers into the connection request if the application uses untrusted data for connection settings. This could allow an attacker to bypass authentication, poison logs, or manipulate web traffic through intermediary servers.

Technologies: [Benoit Chesneau Hackney](https://junglewise.ai/threats/technologies/hackney). Vendors: [Benoit Chesneau](https://junglewise.ai/threats/vendors/benoit-chesneau).

## Quick answers

**Is CVE-2026-47072 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-47072 being exploited in the wild.

**How severe is CVE-2026-47072?** Medium severity, with a CVSS score of 6.9, published 25 May 2026.

**Which products and versions are affected?** Benoit Chesneau Hackney >= 2.0.0, < 4.0.1.

**Is there a fix for CVE-2026-47072?** A patch was published on 2026-06-26: Version 4.0.1 released Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-47072 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-47072?** Check whether you run Benoit Chesneau Hackney at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A CRLF injection vulnerability exists in hackney's WebSocket upgrade request builder (src/hackney_ws.erl). The functions init/1 and do_handshake/1 fail to sanitize the host, path, headers, and protocols options, instead splicing them directly into the raw HTTP/1.1 upgrade request via binary concatenation. Because the library does not strip carriage return (\r), line feed (\n), or null (\0) characters, an attacker can inject arbitrary header lines or rewrite the request line. This can be exploited to forge authentication headers, perform log/cache poisoning, or execute request smuggling through proxies. The issue is fixed in version 4.0.1.

## Affected products

- benoitc hackney >= 2.0.0, < 4.0.1

## Identifiers

- CVE-2026-47072
- GHSA-f9vr-g2g2-x9fg

## Timeline

- 2026-05-25: disclosed
- 2026-06-26: advisory: GitHub Advisory published
- 2026-06-26: patched: Version 4.0.1 released

## References

- [https://api.github.com/users/PJUllrich](https://api.github.com/users/PJUllrich)
- [https://github.com/PJUllrich](https://github.com/PJUllrich)
- [https://api.github.com/users/PJUllrich/gists%7B/gist_id%7D](https://api.github.com/users/PJUllrich/gists%7B/gist_id%7D)
- [https://api.github.com/users/PJUllrich/repos](https://api.github.com/users/PJUllrich/repos)
- [https://avatars.githubusercontent.com/u/10426523?v=4](https://avatars.githubusercontent.com/u/10426523?v=4)
- [https://api.github.com/users/PJUllrich/events%7B/privacy%7D](https://api.github.com/users/PJUllrich/events%7B/privacy%7D)

## Related threats

- [ex-aws ex_aws_sns signature bypass in verify_message/1](https://junglewise.ai/threats/cve-2026-47074-ex-aws-ex-aws-sns-signature-bypass-in-verify-message-1)
- [benoitc hackney resource exhaustion in HTTP/3 response loop](https://junglewise.ai/threats/cve-2026-47077-benoitc-hackney-resource-exhaustion-in-http-3-response-loop)
- [benoitc hackney SSRF via percent-encoded host in normalize/2](https://junglewise.ai/threats/cve-2026-47076-benoitc-hackney-ssrf-via-percent-encoded-host-in-normalize-2)
- [benoitc hackney unbounded memory consumption in WebSocket client](https://junglewise.ai/threats/cve-2026-47073-benoitc-hackney-unbounded-memory-consumption-in-websocket-client)
- [benoitc hackney sensitive data exposure in HTTP/3 redirect handler](https://junglewise.ai/threats/cve-2026-47070-benoitc-hackney-sensitive-data-exposure-in-http-3-redirect)
