CVE-2026-47070: HTTP/3 redirect handler leaks Authorization and Cookie headers to cross-origin redirect target in hackney

Published May 25, 2026
·
Updated

Summary

The HTTP/3 redirect handler in src/hackneyh3.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 followredirect 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 maybestripauthonredirect/2 (the fix for CVE-2018-1000007); the H3 client was added later without it.

Details

In src/hackneyh3.erl, handleredirect/11 (line 165) extracts the redirect target from the server-controlled Location header via getredirectlocation/1 and resolves it with resolveredirecturl/2, which accepts any absolute http:// or https:// URL. It then calls dorequestwithredirect/8 passing the original Headers list unchanged. For 307/308 responses, redirectmethod/2 preserves the original method and body, so the POST body is also forwarded.

No 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 buildrequestheaders/4 serializes the unmodified headers into the QPACK-encoded request.

PoC

1. Issue an HTTP/3 POST to an attacker-controlled origin with followredirect => true and an Authorization: Bearer ... header. 2. The attacker's server responds 307 Location: https://other.host/collect. 3. hackney opens a new connection to other.host and re-sends the original headers and body, including the bearer token and any Cookie headers.

Impact

Credential and request-body disclosure to attacker-controlled origins. Affects hackney 3.1.1 through 4.0.0 when using the HTTP/3 client with followredirect 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).

Resources

Introduction commit: https://github.com/benoitc/hackney/commit/e61b7d04b7826847e1efe614106ef4d580c78eab Patch commit: https://github.com/benoitc/hackney/commit/c58d5b50bade146360b85caf3dc8065807b08246

Other sources

Sensitive Data Exposure vulnerability in benoitc hackney allows Retrieve Embedded Sensitive Data. The HTTP/3 redirect handler in src/hackneyh3.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 followredirect 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.

The main hackney.erl module has maybestripauthonredirect/2 (guarded by the locationtrusted option) to address CVE-2018-1000007, but hackneyh3.erl is missing this protection entirely.

This issue affects hackney: from 3.1.1 before 4.0.1.

— NVD

Affected Software

3 affected componentsFixes available
hex/hackney>=3.1.1<4.0.1
benoitc hackney>=3.1.1<4.0.1
erlang/hackney>=3.1.1<4.0.1
4.0.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade erlang/hackney to a version that resolves this vulnerability.

    Fixed in 4.0.1
  2. Upgrade

    Upgrade benoitc/hackney to a version that resolves this vulnerability.

    Fixed in 4.0.1
  3. Configuration

    When using hackney’s HTTP/3 client, do not use follow_redirect=true; set follow_redirect to false to prevent cross-origin redirects from forwarding Authorization/Cookie (and for 307/308, the original POST body) to attacker-controlled Location targets.

    hackney HTTP/3 client (hackney_h3.erl) follow_redirect = false

Event History

May 25, 2026
CVE Published
via MITRE·02:00 PM
Data Sourced
via MITRE·02:00 PM
DescriptionWeakness
Data Sourced
via NVD·03:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jun 26, 2026
Advisory Published
via GitHub·09:56 PM
Data Sourced
via GitHub·09:56 PM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-47070?

CVE-2026-47070 has a risk score of 55.

2

What type of vulnerability is CVE-2026-47070?

CVE-2026-47070 is classified as a Sensitive Data Exposure vulnerability.

3

How does CVE-2026-47070 affect the hackney software?

CVE-2026-47070 allows the HTTP/3 redirect handler to leak Authorization and Cookie headers to cross-origin redirect targets.

4

How can I fix CVE-2026-47070?

To fix CVE-2026-47070, update your hackney library to a version that mitigates this vulnerability.

5

What should I do if I am impacted by CVE-2026-47070?

If impacted by CVE-2026-47070, immediately review your use of the hackney library and ensure appropriate headers are not being leaked during redirects.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203