Technical impact
The vulnerability is an improper neutralization of CRLF sequences in the domain and path options of the hackney_cookie:setcookie/3 function. The function validates the cookie name and value, but concatenates the domain and path options without checking for CRLF or control characters. An attacker who can control either option—such as forwarding a Host header as the cookie domain or a request path as the cookie path—can inject a literal CRLF sequence, creating arbitrary additional Set-Cookie headers in the HTTP response. This allows HTTP Response Splitting, potentially contaminating downstream cookie handling, though it does not grant 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 < 1% (approximately 0.425%), 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.
Github GHSA