Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSend crafted HTTP request with malicious Host header or path
-
DeliveryApplication forwards header/path to hackney_cookie:setcookie/3 as domain or path option
-
ExploitUnvalidated CRLF bytes pass through iolist concatenation
-
ExecutionHTTP response emits injected Set-Cookie header
-
ImpactVictim browser or downstream cache processes attacker-controlled cookie
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 that the target application forwards a user-controlled value - such as a Host request header, a URL path segment, or a query parameter - directly as the domain or path option to hackney_cookie:setcookie/3 without prior sanitization. This is not a default-configuration vulnerability: the application code must explicitly plumb attacker-influenced HTTP request data into the hackney cookie API. The CVSS AT:P (Attack Requirements: Present) confirms this dependency. The CVSS PR:N and UI:N indicate no authentication or user interaction is required once that forwarding behavior is present. Exploitation is limited by: (1) the application must propagate request-derived data to the domain or path options specifically - not Name or Value, which are already guarded; (2) SSVC classifies automation as 'no', indicating chaining or context-specific setup is required; (3) the CVSS AV:L (Local) designation conflicts with the network-accessible attack path described - if the vector is accurate, a local attacker position would further constrain exploitation scope, but this should be verified with the vendor. |
| Impact | The CVSS 4.0 base score of 2.1 is very low, and EPSS at 0.02% (6th percentile) corroborates minimal observed exploitation pressure. However, there is a notable discrepancy worth flagging: the CVSS vector specifies AV:L (Local attack vector), yet the CVE description explicitly describes a network-accessible exploitation path - an attacker supplying a crafted Host header or URL path over HTTP that an application then forwards to the cookie function. This conflict between the vector and the description should be verified against the vendor advisory at GHSA-mp55-p8c9-rfw2 before using the CVSS score to make triage decisions. The AT:P (Attack Requirements: Present) modifier accurately reflects that exploitation is contingent on a specific - and non-default - application behavior: forwarding user-controlled HTTP request data into hackney's domain or path options. SSVC classifies exploitation as poc-present, not automatable, with partial technical impact. In practice, this is a real but narrow-scope vulnerability whose risk is tightly bounded by whether the consuming application passes request-derived values directly to setcookie/3. |
| Exploit ScenarioDerived | An attacker sends an HTTP request to a web application with a crafted Host header value such as example.com\r\nSet-Cookie: session=attacker_controlled; Path=/. The application extracts this Host value and passes it verbatim as the domain option to hackney_cookie:setcookie/3 when constructing a response. Because the pre-patch code concatenates the domain iolist without validation, the resulting HTTP response contains two Set-Cookie headers - the legitimate one and the attacker's injected one - potentially enabling session fixation, cookie poisoning, or cache poisoning depending on intermediary behavior. A proof-of-concept is confirmed to exist per SSVC. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 08, 2026
CRLF injection in the hackney Erlang HTTP client library's hackney_cookie:setcookie/3 function enables HTTP response splitting against applications using versions 0.9.0 through before 4.0.1. While the function correctly validates the Name and Value cookie arguments against CRLF and control characters, it concatenates the domain and path options verbatim into the output iolist with no equivalent check, creating an injection point. An attacker who can influence the domain or path values passed to that function - for example, by submitting a crafted Host header or URL path that an application forwards directly into the cookie-setting call - can inject arbitrary additional Set-Cookie headers into the HTTP response. No public exploit identified at time of analysis per KEV absence, though SSVC confirms a proof-of-concept exists.
RemediationAI
Upgrade hackney to version 4.0.1 or later, which is the vendor-released patch version confirmed by the CVE description and the upstream commit at https://github.com/benoitc/hackney/commit/8e02b99c28aea1b3fa2ddc0e66f51fe5bb0ac540. The patch adds binary:match validation rejecting CR, LF, VT (\013), FF (\014), null, semicolon, space, and tab from both the domain and path options before they are appended to the cookie iolist. If an immediate upgrade is not feasible, the specific compensating control is to strip or reject CRLF and control characters from any user-controlled input (Host headers, URL paths, query parameters) before passing it as the domain or path argument to hackney_cookie:setcookie/3 - this can be implemented at the application layer with a binary:match guard using the same byte set as the patch. Note that this workaround requires identifying every call site in the application that constructs these options from external input, and missing a single call site leaves the injection path open. Consult the full advisory at https://github.com/benoitc/hackney/security/advisories/GHSA-mp55-p8c9-rfw2.
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: cpe:2.3:a:benoitc:hackney:*:*:*:*:*:*:*:*) is a widely used Erlang HTTP client library. The vulnerability resides in src/hackney_cookie.erl within the setcookie/3 function. The root cause is CWE-93: Improper Neutralization of CRLF Sequences - an inconsistent input validation design where Name and Value undergo CRLF/control-character checks but the domain and path options are passed through binary list concatenation (iolist) with no sanitization. The characters at risk are CR (\r), LF (\n), VT (\013), FF (\014), null (\0), semicolons, and spaces - all of which can be used to prematurely terminate a Set-Cookie header line and inject a subsequent one. The commit diff confirms the fix adds binary:match guards for exactly these byte classes in both the domain and path code paths.
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:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/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 Response Splitting. The hackney_cookie:setcookie/3 function in src/hackney_cookie.erl validates the Name and Value arguments against CRLF and control characters, but concatenates the domain and path options verbatim into the output iolist with no equivalent check. An attacker who controls either option - for example by supplying a Host header value forwarded as the cookie domain, or a request path forwarded as the cookie path - can inject a literal CRLF sequence and arbitrary additional Set-Cookie headers into the HTTP response.
This issue affects hackney: from 0.9.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
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
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
CRLF injection in hackney (Erlang HTTP client, versions 2.0.0-4.0.1) enables header injection into outbound WebSocket up
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
EUVD-2026-31683
GHSA-mp55-p8c9-rfw2
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB