CVE-2026-47071

SOCKS5 TLS upgrade ignores caller timeout in hackney

Published May 25, 2026 CVSS 4.0 · 8.2 High EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

Uncontrolled Resource Consumption vulnerability in the Hackney HTTP client occurs when a SOCKS5 proxy performs an apparently normal handshake and then stalls the TLS upgrade. The implementation incorrectly forwards the caller-supplied timeout to the TLS connection, causing ssl:connect/2 to use an infinite timeout. A process that initiates the connection will therefore block indefinitely, consuming system resources and preventing it from serving other tasks. This can lead to degraded performance or complete service interruption if an attacker repeatedly opens connections.

Affected Systems

The bug affects the Hackney library maintained by benoitc. Versions from 0.8.1 up to but not including 4.0.1 are vulnerable. Upgrading to 4.0.1 or newer eliminates the flaw.

Risk and Exploitability

The CVSS score of 8.2 indicates high severity, but the EPSS score of 0.00753 (less than 1%) indicates a very low exploitation probability, and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector is malicious use of a SOCKS5 proxy that acts correctly during the handshake but then stalls or sends a partial TLS ServerHello. An attacker could force a target process to hang by repeatedly establishing such connections, exhausting CPU, memory, or other process limits. Because the flaw lies in the library, it can be exploited wherever Hackney is used without additional privileges.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Hackney to version 4.0.1 or later, where the timeout is properly forwarded during the TLS upgrade.
  • If an immediate upgrade is not viable, modify the SOCKS5 client configuration to explicitly provide a finite timeout for the TLS handshake, for example by using ssl:connect/4 or a custom wrapper that enforces a timeout.
  • Place the Hackney connection in a supervised process that terminates after a configurable inactivity period, ensuring that stalled connections do not accumulate resources over time.

Generated by OpenCVE AI on November 22, 2026 at 23:58 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-gp9c-pm5m-5cxr Hackney: `ssl:connect/2` post-handshake upgrade has no timeout
History
Type Values Removed Values Added
Description 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.10.0 before 4.0.1. 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.
References
Type Values Removed Values Added
Metrics cvssV3_1

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

Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
Description 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.10.0 before 4.0.1.
Title SOCKS5 TLS upgrade ignores caller timeout in hackney
First Time appeared Benoitc
Benoitc hackney
Weaknesses CWE-400
CPEs cpe:2.3:a:benoitc:hackney:*:*:*:*:*:*:*:*
Vendors & Products Benoitc
Benoitc hackney
References
Metrics cvssV4_0

{'score': 8.2, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption

Sources

Status
PUBLISHED
Assigner
EEF
Published
Updated
Nov 20, 2026, 8:04 AM
Reserved
May 18, 2026, 5:28 PM
Status
Modified
Published
May 25, 2026, 3:16 PM
Modified
Nov 20, 2026, 9:20 AM