Am I affected?

type your hackney version to check

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.

Weaknesses & attack patterns

Weakness

CWE-93 · Improper Neutralization of CRLF Sequences ('CRLF Injection') in catalog → MITRE ↗

Attack patterns

CAPEC-34 · HTTP Response Splitting MITRE ↗

Affected — Hex / hackney Hex.pm ↗ Repository ↗

0.9.0 < 4.0.1 affected
every other version: unaffected
default status unaffected
cpe cpe:2.3:a:benoitc:hackney:*:*:*:*:*:*:*:*
modules · source files · routines
modules hackney_cookie
source files src/hackney_cookie.erl
routines hackney_cookie:setcookie/3

Affected — GitHub / benoitc/hackney Repository ↗

602d5c7 < 8e02b99 affected
every other version: unaffected
default status unaffected
cpe cpe:2.3:a:benoitc:hackney:*:*:*:*:*:*:*:*
modules · source files · routines
modules hackney_cookie
source files src/hackney_cookie.erl
routines hackney_cookie:setcookie/3

References

Credits

Peter Ullrich Finder
Benoit Chesneau Remediation developer
Jonatan Männchen / EEF Analyst

CVSS breakdown

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
« All CVEs