Erlang Ecosystem Foundation
EEF-CVE-2026-47071
SOCKS5 TLS upgrade ignores caller timeout in hackney
Details
Summary
Uncontrolled Resource Consumption vulnerability in benoitc hackney allows Flooding.
The SOCKS5 transport in src/hackney_socks5.erl correctly applies the caller-supplied timeout to the SOCKS5 negotiation phase, but then upgrades the connection to TLS using the two-argument form ssl:connect/2, which defaults to an infinite timeout. The Timeout value is in scope at the call site but is not forwarded. A hostile SOCKS5 proxy that completes the SOCKS5 handshake normally and then goes silent (or sends a partial TLS ServerHello and stalls) will cause the connecting process to block indefinitely, regardless of the connect_timeout or recv_timeout options supplied by the caller.
This issue affects hackney: from 0.8.1 before 4.0.1.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Hex | hackney | From 0.8.1 before 4.0.1 (fixed in 4.0.1) |
4.0.0, 3.2.1, 3.2.0, 3.1.2, 3.1.1, 3.1.0, 3.0.3, 3.0.2 and 103 more |
References
- https://github.com/benoitc/hackney/security/advisories/GHSA-gp9c-pm5m-5cxr
- https://cna.erlef.org/cves/CVE-2026-47071.html
- https://github.com/benoitc/hackney/commit/34cdbd1d20a282aacc286a89327465a3925b4c5d
- https://github.com/benoitc/hackney/commit/5ccdab725c561a6f03d05a51f2d0664f98236dae
- https://hex.pm/packages/hackney