Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit CRLF-bearing value via untrusted input
-
DeliveryApplication forwards value into hackney_ws:start_link opts
-
Exploithackney_ws do_handshake concatenates value verbatim
-
ExecutionInjected headers splice into outbound HTTP/1.1 upgrade request
-
PersistUpstream server or proxy processes injected headers
-
ImpactAchieve spoofing, cache poisoning, or request smuggling
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization CRLF sequence sanitization
|
| Exploitation Conditions | Exploitation requires two concurrent conditions: (1) the target application uses hackney WebSocket connections (hackney_ws:start_link/1) and forwards attacker-controlled data into any of the four vulnerable option fields - host, path, ExtraHeaders header names or values, or protocols - without prior sanitization; and (2) the upstream endpoint or an intermediary proxy acts on injected headers in a meaningful way (credential spoofing, cache keying, routing). The vulnerability does NOT affect applications where hackney WebSocket options are built entirely from static or internally-validated values. The CVSS AT:P modifier explicitly encodes this conditionality. Authentication to the vulnerable application is not required (PR:N), but the application itself must have a code path that accepts external input and maps it to hackney upgrade options - a design flaw in the consuming application, not a default behavior. Exploitation is limited to the outbound WebSocket upgrade request path only; standard hackney HTTP calls (hackney:request/5) are not affected. |
| Impact | The CVSS 4.0 score of 6.9 reflects a meaningful but conditional threat: AV:N/AC:L/PR:N/UI:N indicates no authentication or user interaction is needed, but the AT:P (Attack Requirements: Present) modifier is critical - exploitation requires the calling application to propagate untrusted input into hackney WebSocket options, which is not a default behavior. The CVSS subsequent-system integrity impact is rated High (SI:H), capturing the real downstream risk: injected headers can manipulate upstream servers or intermediary proxies rather than the vulnerable system directly. EPSS at 0.05% (15th percentile) reflects the narrow exploitation path - this is not a fire-and-forget network vulnerability but one dependent on application logic flaws in the consumer code. SSVC rates it Automatable:yes, meaning once a vulnerable application is identified, exploitation is repeatable without manual interaction. The 'RCE' tag in the input data appears mislabeled and conflicts with both the CVE description and CWE-93 classification; no remote code execution vector is described or evidenced in the patch diff - analysts should treat that tag as erroneous. Overall this is a genuine, exploitable vulnerability for applications that pass untrusted data into hackney WebSocket options, but low population-level risk due to the indirect attack path. |
| Exploit ScenarioDerived | An application acts as a WebSocket proxy, accepting a client-supplied URL or header values and forwarding them into hackney_ws:start_link/1 to open an upstream WebSocket connection. An attacker submits a header value such as legitimate-value\r\nX-Injected: malicious into the application, which is forwarded verbatim; hackney splices this into the upgrade request, causing the upstream server to see an additional X-Injected header - enabling credential spoofing, cache poisoning of shared intermediary proxies, or HTTP request smuggling depending on the upstream infrastructure. The fix commit's test (test_handshake_header_injection) demonstrates this exact pattern as a functional proof-of-concept, confirming the injection succeeds on unpatched versions. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 08, 2026
CRLF injection in hackney (Erlang HTTP client, versions 2.0.0-4.0.1) enables header injection into outbound WebSocket upgrade requests when caller-supplied options - host, path, ExtraHeaders, or protocols - contain unsanitized user input. The vulnerable code in src/hackney_ws.erl splices these values verbatim via binary concatenation into a raw HTTP/1.1 upgrade request with no CR, LF, or NUL filtering at any of the four injection sites. No active exploitation is confirmed (not in CISA KEV), though SSVC assesses exploitation status as 'poc' and the fix commit includes a functional test that doubles as a proof-of-concept; EPSS remains very low at 0.05% (15th percentile), consistent with an indirect, application-mediated attack path rather than mass exploitation.
RemediationAI
Upstream fix available (patch commit 52310ca807e7b48441ba0e9129171f535313fdd1); released patched version 4.0.1 confirmed by vendor advisory description and NVD version range - upgrade hackney to 4.0.1 or later to apply the fix, which introduces strict validation rejecting CR, LF, and NUL bytes in all WebSocket upgrade fields before any bytes are sent to the socket. The advisory is at https://github.com/benoitc/hackney/security/advisories/GHSA-f9vr-g2g2-x9fg. If an immediate upgrade is not feasible, the compensating control is to sanitize all values supplied to hackney_ws:start_link/1 in application code before passing them - strip or reject \r (0x0D), \n (0x0A), and NUL (0x00) from host, path, extra header names, header values, and sub-protocol strings derived from untrusted input; note this control relies on discipline in every call site and may be incomplete if new call sites are added later. A second compensating control is to avoid forwarding any URL components or HTTP headers from untrusted external requests directly into hackney WebSocket upgrade options without a normalization layer.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
hackney (cpe:2.3:a:benoitc:hackney) is a widely used Erlang HTTP client library. The WebSocket subsystem (src/hackney_ws.erl) constructs HTTP/1.1 upgrade handshake frames by directly concatenating binary values from the caller-supplied opts map - specifically the host, path, ExtraHeaders, and protocols fields - into the wire format using Erlang iolist binary construction. CWE-93 (Improper Neutralization of CRLF Sequences) identifies the root cause: HTTP header framing relies on CRLF delimiters, so any user-controlled binary containing \r\n or \0 can terminate one header field and inject additional header lines or even a second request body into the outbound upgrade request. The patch at commit 52310ca introduces valid_handshake_fields/2, which calls has_ctl_bytes/1 to reject any path or header field containing \r, \n, or NUL before the request is written to the socket - turning the injection attempt into a hard {error, invalid_handshake_header} rather than silently splicing the attacker content.
Know when Hackney gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Primary rating from Vendor (EEF) · only source for this CVE.
CVSS VectorVendor: EEF
Lifecycle Timeline
2DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Denial of service in benoitc hackney (Erlang HTTP client) versions 2.0.0 through 4.0.0 allows a malicious WebSocket serv
Denial of service in benoitc hackney (Erlang HTTP client) 2.0.0 through 4.0.0 allows remote unauthenticated attackers to
Denial-of-service in benoitc's hackney Erlang HTTP client (versions 2.0.0-beta.1 through 4.0.0) allows any HTTP origin s
Remote denial of service in benoitc hackney 2.0.0 through 4.0.0 lets a malicious HTTP/3 server exhaust a client's BEAM p
Denial of service in benoitc hackney (Erlang HTTP client) versions 0.10.0 through 4.0.0 lets a hostile SOCKS5 or HTTP CO
SSRF allowlist bypass in hackney (Erlang HTTP client) versions 0.13.0 through before 4.0.1 allows attackers who control
HTTP Request Splitting via CRLF injection in hackney, the Erlang/Elixir HTTP client library, allows an attacker who cont
Credential leakage in the hackney Erlang HTTP client library (versions 3.1.1 through before 4.0.1) allows a malicious or
Improper certificate validation in the Erlang HTTP client hackney (1.24.0 through 4.8.x) lets an on-path attacker impers
Memory exhaustion in the Erlang hackney HTTP client (2.0.0-beta.1 through 4.8.x) lets any server the client requests for
Server-side request forgery in the Erlang hackney HTTP client (versions 4.0.1 up to but not including 4.9.0) lets an att
CRLF injection in the hackney Erlang HTTP client library's hackney_cookie:setcookie/3 function enables HTTP response spl
EUVD-2026-31690
GHSA-f9vr-g2g2-x9fg
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB