{"id":"CVE-2026-47071","aliases":["CVE-2026-47071","GHSA-gp9c-pm5m-5cxr","EEF-CVE-2026-47071"],"related":[],"kind":"vulnerability","state":"published","title":"SOCKS5 TLS upgrade ignores caller timeout in hackney","summary":"Uncontrolled Resource Consumption vulnerability in benoitc hackney allows Flooding.\n\nThe 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.\n\nThis issue affects hackney: from 0.8.1 before 4.0.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Uncontrolled Resource Consumption vulnerability in benoitc hackney allows Flooding.\n\nThe 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.\n\nThis issue affects hackney: from 0.8.1 before 4.0.1.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nThe SOCKS5 transport in `src/hackney_socks5.erl` correctly applies the caller-supplied timeout to the SOCKS5 negotiation phase, but then upgrades the tunnel to TLS using `ssl:connect/2` (the two-argument form), which defaults to `infinity`. The `Timeout` value is in scope at that call site but is never forwarded. A hostile or man-in-the-middled SOCKS5 proxy that completes the SOCKS5 handshake normally and then stalls the TLS exchange will pin the connecting Erlang process and socket indefinitely, regardless of any `connect_timeout` or `recv_timeout` options the caller set.\n\n### Details\n\nIn `src/hackney_socks5.erl`, line 65, after the SOCKS5 negotiation succeeds, the code calls:\n\n```erlang\nssl:connect(Socket, SSLOpts)\n```\n\nThe three-argument form `ssl:connect/3` takes a timeout; the two-argument form used here defaults to `infinity`. The variable `Timeout` (already used for SOCKS5 recv calls earlier in the same function) is simply not passed. The bytes that drive the TLS handshake on the upstream side of the tunnel come from whatever endpoint the proxy connects to. A hostile proxy can complete SOCKS5 normally, then either stay silent or send a partial `ServerHello` and stop, keeping `ssl:connect/2` blocked forever. No certificate forgery is needed.\n\n### PoC\n\n1. Stand up a SOCKS5 proxy that completes the SOCKS5 greeting and CONNECT reply normally, then goes silent (never sends a TLS ServerHello).\n2. Issue an HTTPS request through it via hackney with `connect_timeout` and `recv_timeout` set to a short value (e.g. 2000 ms).\n3. Observe the calling process remains blocked well past the configured timeout, consuming a process and socket until killed externally.\n\n### Impact\n\nDenial of service via unbounded process and socket consumption. Affects hackney 0.10.0 through 4.0.0 for any HTTPS request routed through a SOCKS5 proxy. The `connect_timeout` and `recv_timeout` options give a false sense of safety since they are not honored during the TLS upgrade. CVSS v4.0: **8.2 (HIGH)**.\n\n## Resources\n\n* Introduction commit: https://github.com/benoitc/hackney/commit/34cdbd1d20a282aacc286a89327465a3925b4c5d\n* Patch commit: https://github.com/benoitc/hackney/commit/5ccdab725c561a6f03d05a51f2d0664f98236dae","format":"markdown","source":"ghsa"},{"lang":"en","text":"## Summary\n\nUncontrolled Resource Consumption vulnerability in benoitc hackney allows Flooding.\n\nThe 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.\n\nThis issue affects hackney: from 0.8.1 before 4.0.1.","format":"markdown","source":"eef"},{"lang":"es","text":"Una vulnerabilidad de Consumo de Recursos Incontrolado en benoitc hackney permite Inundación. El transporte SOCKS5 en src/hackney_socks5.erl aplica correctamente el tiempo de espera proporcionado por el llamador a la fase de negociación SOCKS5, pero luego actualiza la conexión a TLS usando la forma de dos argumentos ssl:connect/2, que por defecto tiene un tiempo de espera infinito. El valor de Timeout está en el ámbito en el sitio de la llamada pero no se reenvía. Un proxy SOCKS5 hostil que completa el handshake SOCKS5 normalmente y luego se queda en silencio (o envía un TLS ServerHello parcial y se detiene) hará que el proceso de conexión se bloquee indefinidamente, independientemente de las opciones connect_timeout o recv_timeout proporcionadas por el llamador.\n\nEste problema afecta a hackney: desde 0.10.0 antes de 4.0.1.","source":"nvd"}],"published":"2026-05-25T14:00:41.112Z","modified":"2026-11-26T17:23:03.030Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","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","score":8.2,"rating":"HIGH"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","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","score":8.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"HIGH"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","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"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-400"],"affected":[{"ranges":[{"type":"semver","introduced":"0.8.1","fixed":"4.0.1","status":"affected"}],"vendor":"benoitc","product":"hackney","package":"hackney","cpe":"cpe:2.3:a:benoitc:hackney:*:*:*:*:*:*:*:*","repo":"https://github.com/benoitc/hackney","source":"cvelist"},{"ranges":[{"type":"git","introduced":"34cdbd1d20a282aacc286a89327465a3925b4c5d","fixed":"5ccdab725c561a6f03d05a51f2d0664f98236dae","status":"affected"}],"vendor":"benoitc","product":"hackney","package":"benoitc/hackney","cpe":"cpe:2.3:a:benoitc:hackney:*:*:*:*:*:*:*:*","repo":"https://github.com/benoitc/hackney","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.10.0","status":"affected","fixed":"4.0.1"}],"ecosystem":"Hex","package":"hackney","purl":"pkg:hex/hackney","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.8.1","status":"affected","fixed":"4.0.1"}],"ecosystem":"Hex","package":"hackney","purl":"pkg:hex/hackney","source":"eef"},{"ranges":[{"type":"git","introduced":"34cdbd1d20a282aacc286a89327465a3925b4c5d","status":"affected","fixed":"5ccdab725c561a6f03d05a51f2d0664f98236dae"}],"repo":"https://github.com/benoitc/hackney","source":"eef"},{"ranges":[{"status":"affected","introduced":"0.10.0","fixed":"4.0.1"}],"vendor":"benoitc","product":"hackney","cpe":"cpe:2.3:a:benoitc:hackney:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/benoitc/hackney/security/advisories/GHSA-gp9c-pm5m-5cxr","tags":["advisory","exploit","patch","related","vendor-advisory","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-47071.html","tags":["patch","related","third-party-advisory","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-47071","tags":["patch","related","third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/benoitc/hackney/commit/34cdbd1d20a282aacc286a89327465a3925b4c5d","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/benoitc/hackney/commit/5ccdab725c561a6f03d05a51f2d0664f98236dae","tags":["fix","patch","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47071","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/benoitc/hackney","tags":["package"],"sources":["ghsa"]},{"url":"https://hex.pm/packages/hackney","tags":["package"],"sources":["eef"]}],"credits":["Peter Ullrich","Jonatan Männchen / EEF","Benoit Chesneau"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-05-26T15:48:41.704Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-47071","url":"https://www.cve.org/CVERecord?id=CVE-2026-47071","licence":"CVE Terms of Use","modified":"2026-11-20T08:04:14.843Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-gp9c-pm5m-5cxr","url":"https://github.com/advisories/GHSA-gp9c-pm5m-5cxr","licence":"CC-BY-4.0","modified":"2026-06-26T22:00:09.488Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-47071","url":"https://osv.dev/vulnerability/EEF-CVE-2026-47071","licence":"CC-BY-4.0","modified":"2026-11-26T17:23:03.030Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-47071","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47071","licence":"Public domain","modified":"2026-11-20T09:20:09.813Z"}],"updatedAt":"2026-11-26T17:37:05.533Z","epss":{"score":0.00753,"percentile":0.56281,"date":"2026-12-01T12:00:22.000Z"}}