CVE-2026-113440
Medium 6.0No known exploitationFix availableHTTP/1.1 and HTTP/2 redirects resend basic_auth and cookie to a different scheme or port in hackney
Record last updated
CVSS score
Medium on a 0 to 10 scale
EPSS, chance of exploitation in 30 days
Higher than 25% of scored CVEs. A prediction, not evidence.
CISA remediation deadline
Not in the KEV catalog
Description
Insufficiently Protected Credentials vulnerability in hackney in benoitc hackney allows a redirecting server to obtain the basic_auth and cookie credentials of a request via a same-host redirect to another scheme or port. With follow_redirect enabled, hackney:follow_redirect/10 in src/hackney.erl reissues the request to the Location target after hackney:maybe_strip_auth_on_redirect/3, which compared only the hostname of the current and the redirect URL. A redirect from https to http on the same host resent the Authorization and Cookie headers in cleartext, where an on-path attacker can read them, and a redirect to another port on the same host handed them to a different service. location_trusted forwards credentials to any target by design and is unchanged. This issue affects hackney: from 2.0.0 before 4.9.0.
Weakness: CWE-522
Patching and mitigation
- Patch status
- Fix available (source: CVE record (EEF))
- Fix documented (source date)
- Mitigation
- Disable follow_redirect and handle the Location header in the application, or pass the credentials as explicit Authorization and Cookie request headers instead of the basic_auth and cookie options. hackney:follow_redirect/10 issues the redirected request with an empty header list, so explicit headers reach the first server only. Source (opens in a new tab)
- Vendor guidance
- github.com (opens in a new tab)
Affected products
| Vendor | Product | Affected versions | Fixed in | Per |
|---|---|---|---|---|
| benoitc | hackney | from 2.0.0 before 4.9.0 | 4.9.0 | CVE Program |
| benoitc | hackney | from 8f944559bdb83da60b5c06f6cf6d842591278364 before 6548384b22ea196023a1963e2967d5715b6d9564 | 6548384b22ea196023a1963e2967d5715b6d9564 | CVE Program |
Timeline
Disclosure
CVE record published by EEF
Source: CVE Program (opens in a new tab)
Patch
Fix documented by CVE record (EEF)
Vendor guidance and references
- Fix commit 6548384 in benoitc/hackney (opens in a new tab)patch
- hackney 4.9.0 release notes (opens in a new tab)vendor-advisory, related
- EEF CNA record for CVE-2026-113440 (opens in a new tab)related
- Introducing commit 8f94455 in benoitc/hackney (opens in a new tab)related
- Strip basic_auth and cookie on redirects that change scheme or port (benoitc/hackney#979) (opens in a new tab)related
- OSV record EEF-CVE-2026-113440 (opens in a new tab)related