{"id":"CVE-2026-47070","aliases":["CVE-2026-47070","GHSA-h73q-4w9q-82h4","EEF-CVE-2026-47070"],"related":[],"kind":"vulnerability","state":"published","title":"HTTP/3 redirect handler leaks Authorization and Cookie headers to cross-origin redirect target in hackney","summary":"Sensitive Data Exposure vulnerability in benoitc hackney allows Retrieve Embedded Sensitive Data.\n\nThe HTTP/3 redirect handler in src/hackney_h3.erl passes the original request headers unchanged to the redirect target without performing any cross-origin check. When a client issues an HTTP/3 request with follow_redirect enabled and includes Authorization or Cookie headers, a server responding with a 3xx redirect to a different host will cause the client to forward those credentials verbatim to the new origin.\n\nThe main hackney.erl module has maybe_strip_auth_on_redirect/2 (guarded by the location_trusted option) to address CVE-2018-1000007, but hackney_h3.erl is missing this protection entirely.\n\nThis issue affects hackney: from 3.1.1 before 4.0.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Sensitive Data Exposure vulnerability in benoitc hackney allows Retrieve Embedded Sensitive Data.\n\nThe HTTP/3 redirect handler in src/hackney_h3.erl passes the original request headers unchanged to the redirect target without performing any cross-origin check. When a client issues an HTTP/3 request with follow_redirect enabled and includes Authorization or Cookie headers, a server responding with a 3xx redirect to a different host will cause the client to forward those credentials verbatim to the new origin.\n\nThe main hackney.erl module has maybe_strip_auth_on_redirect/2 (guarded by the location_trusted option) to address CVE-2018-1000007, but hackney_h3.erl is missing this protection entirely.\n\nThis issue affects hackney: from 3.1.1 before 4.0.1.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nThe HTTP/3 redirect handler in `src/hackney_h3.erl` forwards the original request headers (`Authorization`, `Cookie`, `Proxy-Authorization`) and, for 307/308 responses, the original request body to the redirect target without checking whether the target host matches the origin. When `follow_redirect` is enabled and a server responds with a cross-origin `Location`, hackney delivers the caller's credentials verbatim to the attacker-controlled host. The main hackney HTTP/1 client has `maybe_strip_auth_on_redirect/2` (the fix for CVE-2018-1000007); the H3 client was added later without it.\n\n### Details\n\nIn `src/hackney_h3.erl`, `handle_redirect/11` (line 165) extracts the redirect target from the server-controlled `Location` header via `get_redirect_location/1` and resolves it with `resolve_redirect_url/2`, which accepts any absolute `http://` or `https://` URL. It then calls `do_request_with_redirect/8` passing the original `Headers` list unchanged. For 307/308 responses, `redirect_method/2` preserves the original method and body, so the POST body is also forwarded.\n\nNo comparison is made between the original URL's scheme, host, or port and the redirect target. The downstream `connect/3` opens a new QUIC connection to whatever the `Location` header named, and `build_request_headers/4` serializes the unmodified headers into the QPACK-encoded request.\n\n### PoC\n\n1. Issue an HTTP/3 POST to an attacker-controlled origin with `follow_redirect => true` and an `Authorization: Bearer ...` header.\n2. The attacker's server responds `307 Location: https://other.host/collect`.\n3. hackney opens a new connection to `other.host` and re-sends the original headers and body, including the bearer token and any `Cookie` headers.\n\n### Impact\n\nCredential and request-body disclosure to attacker-controlled origins. Affects hackney 3.1.1 through 4.0.0 when using the HTTP/3 client with `follow_redirect` enabled. Any upstream that is malicious, compromised, or reachable via DNS/MITM can steal session tokens, bearer credentials, and POST bodies. CVSS v4.0: **6.0 (MEDIUM)**.\n\n## Resources\n\n* Introduction commit: https://github.com/benoitc/hackney/commit/e61b7d04b7826847e1efe614106ef4d580c78eab\n* Patch commit: https://github.com/benoitc/hackney/commit/c58d5b50bade146360b85caf3dc8065807b08246","format":"markdown","source":"ghsa"},{"lang":"en","text":"## Summary\n\nSensitive Data Exposure vulnerability in benoitc hackney allows Retrieve Embedded Sensitive Data.\n\nThe HTTP/3 redirect handler in `src/hackney_h3.erl` passes the original request headers unchanged to the redirect target without performing any cross-origin check. When a client issues an HTTP/3 request with `follow_redirect` enabled and includes `Authorization` or `Cookie` headers, a server responding with a `3xx` redirect to a different host will cause the client to forward those credentials verbatim to the new origin.\n\nThe main `hackney.erl` module has `maybe_strip_auth_on_redirect/2` (guarded by the `location_trusted` option) to address CVE-2018-1000007, but `hackney_h3.erl` is missing this protection entirely.\n\nThis issue affects hackney: from 3.1.1 before 4.0.1.","format":"markdown","source":"eef"},{"lang":"es","text":"Vulnerabilidad de Exposición de Datos Sensibles en benoitc hackney permite Recuperar Datos Sensibles Incrustados. El gestor de redirección HTTP/3 en src/hackney_h3.erl pasa las cabeceras de la solicitud original sin cambios al objetivo de redirección sin realizar ninguna comprobación de origen cruzado. Cuando un cliente emite una solicitud HTTP/3 con follow_redirect habilitado e incluye cabeceras de Autorización o Cookie, un servidor que responde con una redirección 3xx a un host diferente hará que el cliente reenvíe esas credenciales textualmente al nuevo origen.\n\nEl módulo principal hackney.erl tiene maybe_strip_auth_on_redirect/2 (protegido por la opción location_trusted) para abordar CVE-2018-1000007, pero hackney_h3.erl carece completamente de esta protección.\n\nEste problema afecta a hackney: desde 3.1.1 antes de 4.0.1.","source":"nvd"}],"published":"2026-05-25T14:00:46.420Z","modified":"2026-11-25T17:23:11.915Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":6,"rating":"MEDIUM"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":6,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","rating":"MEDIUM"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-601"],"affected":[{"ranges":[{"type":"semver","introduced":"3.1.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":"e61b7d04b7826847e1efe614106ef4d580c78eab","fixed":"c58d5b50bade146360b85caf3dc8065807b08246","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":"3.1.1","status":"affected","fixed":"4.0.1"}],"ecosystem":"Hex","package":"hackney","purl":"pkg:hex/hackney","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.1.1","status":"affected","fixed":"4.0.1"}],"ecosystem":"Hex","package":"hackney","purl":"pkg:hex/hackney","source":"eef"},{"ranges":[{"type":"git","introduced":"e61b7d04b7826847e1efe614106ef4d580c78eab","status":"affected","fixed":"c58d5b50bade146360b85caf3dc8065807b08246"}],"repo":"https://github.com/benoitc/hackney","source":"eef"},{"ranges":[{"status":"affected","introduced":"3.1.1","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-h73q-4w9q-82h4","tags":["advisory","exploit","patch","related","vendor-advisory","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-47070.html","tags":["patch","related","third-party-advisory","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-47070","tags":["patch","related","third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/benoitc/hackney/commit/e61b7d04b7826847e1efe614106ef4d580c78eab","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/benoitc/hackney/commit/c58d5b50bade146360b85caf3dc8065807b08246","tags":["fix","patch","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47070","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":"no","technicalImpact":"partial","date":"2026-05-26T15:47:18.083Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-47070","url":"https://www.cve.org/CVERecord?id=CVE-2026-47070","licence":"CVE Terms of Use","modified":"2026-11-20T08:01:27.269Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-h73q-4w9q-82h4","url":"https://github.com/advisories/GHSA-h73q-4w9q-82h4","licence":"CC-BY-4.0","modified":"2026-06-26T22:00:11.492Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-47070","url":"https://osv.dev/vulnerability/EEF-CVE-2026-47070","licence":"CC-BY-4.0","modified":"2026-11-25T17:23:11.915Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-47070","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47070","licence":"Public domain","modified":"2026-11-20T08:18:36.120Z"}],"updatedAt":"2026-11-25T22:59:22.274Z","epss":{"score":0.00372,"percentile":0.33203,"date":"2026-12-01T12:00:22.000Z"}}