Am I affected?

type your hackney version to check

Description

Improper Neutralization of CRLF Sequences vulnerability in benoitc hackney allows HTTP Request Splitting.

hackney does not percent-encode carriage return (\r) or line feed (\n) characters in the URL query component before constructing the HTTP/1.1 request target. Characters outside the grammar defined in RFC 3986 Section 3.4 must be percent-encoded, but hackney_url:make_url/3 passes the query binary directly without validation or escaping. An attacker who can control all or part of a URL passed to hackney can inject raw CRLF sequences into the query string, which are then sent as HTTP line breaks in the request target. This enables injection of arbitrary HTTP headers or splitting of the HTTP request.

This issue affects hackney: from 0.13.1 before 4.0.1.

Weaknesses & attack patterns

Weakness

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

Attack patterns

CAPEC-105 · HTTP Request Splitting MITRE ↗

Affected — Hex / hackney Hex.pm ↗ Repository ↗

0.13.1 < 4.0.1 affected
every other version: unaffected
cpe cpe:2.3:a:benoitc:hackney:*:*:*:*:*:*:*:*
modules · source files · routines
modules hackney_url
source files src/hackney_url.erl
routines hackney_url:make_url/3

Affected — GitHub / benoitc/hackney Repository ↗

8bb1a35 < ca73dd0 affected
every other version: unaffected
cpe cpe:2.3:a:benoitc:hackney:*:*:*:*:*:*:*:*
modules · source files · routines
modules hackney_url
source files src/hackney_url.erl
routines hackney_url:make_url/3

References

Credits

tepel-chen Finder
Benoit Chesneau Remediation developer
Jonatan Männchen / EEF Analyst

CVSS breakdown

CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:N/VI:H/VA:N/SC:N/SI:H/SA:N
« All CVEs