Description
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.
Published: 2026-05-25
Score: 2.1 Low
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability is an improper neutralization of CRLF characters within the domain and path options passed to the hackney_cookie:setcookie/3 function in Erlang’s Hackney library. The function correctly validates the cookie name and value, but it does not sanitize the domain and path parameters. An attacker who can influence either of these options—such as by supplying a Host header that is forwarded as the cookie domain or a request path forwarded as the cookie path—can inject a literal CRLF sequence. This injection allows the attacker to append arbitrary additional Set-Cookie headers to the HTTP response, leading to HTTP Response Splitting. The impact is limited to the injection of extra response headers and potential manipulation of downstream cookie processing, but it does not provide remote code execution or privilege escalation.

Affected Systems

Applications that depend on the Hackney HTTP client library, specifically versions from 0.9.0 up to, but not including, 4.0.1, are affected. Any Erlang or Elixir project that employs hackney to send HTTP requests and sets cookies using the stated function is at risk.

Risk and Exploitability

The CVSS score of 2.1 reflects a low severity assessment. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog, indicating no current widespread exploitation. However, the attack vector is remote and relies on the ability to supply a controlled host header or request path that propagates into the cookie domain or path. If an attacker can achieve this control—for example, by influencing client requests or using proxy settings—they can inject CRLF sequences and alter server responses. The likelihood of successful exploitation depends on the presence of a path that is forwarded unfiltered to hackney, which is a relatively common scenario in web applications that forward client headers for subdomain cookie setting.

Generated by OpenCVE AI on May 25, 2026 at 15:53 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Hackney to version 4.0.1 or later, which contains the proper sanitization of domain and path options.
  • If an immediate upgrade is not feasible, manually sanitize the domain and path arguments before passing them to hackney_cookie:setcookie/3, ensuring no CRLF or control characters are present.
  • Inspect outgoing HTTP responses for unexpected Set-Cookie headers or abnormal header injection to confirm that no CRLF injection is occurring.

Generated by OpenCVE AI on May 25, 2026 at 15:53 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 27 May 2026 14:00:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N'}


Tue, 26 May 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 25 May 2026 14:30:00 +0000

Type Values Removed Values Added
Description 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.
Title CRLF injection in cookie domain/path options in hackney
First Time appeared Benoitc
Benoitc hackney
Weaknesses CWE-93
CPEs cpe:2.3:a:benoitc:hackney:*:*:*:*:*:*:*:*
Vendors & Products Benoitc
Benoitc hackney
References
Metrics cvssV4_0

{'score': 2.1, 'vector': '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: EEF

Published:

Updated: 2026-05-27T15:40:38.975Z

Reserved: 2026-05-18T17:28:08.322Z

Link: CVE-2026-47069

cve-icon Vulnrichment

Updated: 2026-05-26T15:57:05.632Z

cve-icon NVD

Status : Analyzed

Published: 2026-05-25T15:16:21.870

Modified: 2026-05-27T13:53:28.177

Link: CVE-2026-47069

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-25T17:15:30Z

Weaknesses
  • CWE-93

    Improper Neutralization of CRLF Sequences ('CRLF Injection')