Skip to content

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

CRLF injection in WebSocket upgrade request in hackney

High Hex
Severity
0.0 / 10
High · CVSS 4.0
Exploit chance (EPSS)
0.54%
Chance of exploitation in the next 30 days. Higher than 45.56% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-93 Improper Neutralization of CRLF Sequences ('CRLF Injection')
Fix
4.0.1
Upgrade hackney to this version or later

Description

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.

Affected versions

Hex

PackageVulnerableFixed in
hackney
>= 2.0.0, < 4.0.1
4.0.1

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

hackney Hex → 4.0.1

mix
{:hackney, "~> 4.0.1"} # then: mix deps.update hackney

Severity breakdown

CVSS 4.0 0.0

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:H/SA:N

Attack vector
Network
Attack complexity
Low
Attack requirements
Present
Privileges required
None
User interaction
None
Confidentiality (vulnerable system)
None
Integrity (vulnerable system)
Low
Availability (vulnerable system)
None
Confidentiality (subsequent systems)
None
Integrity (subsequent systems)
High
Availability (subsequent systems)
None

CVSS 3.1 7.5

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

Weakness

CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')

The product uses CRLF (carriage return line feeds) as a special element, e.g. to separate lines or records, but it does not neutralize or incorrectly neutralizes CRLF sequences from inputs.

How to prevent it
  • Implementation: Avoid using CRLF as a special sequence.
  • Implementation: Appropriately filter or quote CRLF sequences in user-controlled input.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
EEF-CVE-2026-97200
Unbounded response body buffering and decompression in hackney
Not rated yet Also affects hackney
EEF-CVE-2026-115693
Custom cacerts or cacertfile do not restrict trust to the pinned CA in hackney
Not rated yet Also affects hackney
EEF-CVE-2026-113440
HTTP/1.1 and HTTP/2 redirects resend basic_auth and cookie to a different scheme or port in hackney
Not rated yet Also affects hackney
EEF-CVE-2026-115700
SSRF allowlist bypass via percent-encoded bracketed IPv6 or trailing-dot IP literal in hackney
Not rated yet Also affects hackney
EEF-CVE-2026-112880
CRLF injection in Proxy-Authorization header built from proxy_auth_fun in hackney
Not rated yet Also affects hackney
EEF-CVE-2026-47073
Unbounded memory consumption in WebSocket client in hackney
High Also affects hackney
EEF-CVE-2026-47067
Atom table exhaustion via unrecognized URL schemes in hackney
High Also affects hackney
EEF-CVE-2026-47076
SSRF allowlist bypass via percent-encoded host in hackney
Medium Also affects hackney

Credits: Benoit Chesneau, Jonatan Männchen / EEF, Peter Ullrich

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor