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.
Severity (CVSS)
| Base score | 6 |
|---|---|
| Severity | Medium |
| Version | 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 |
| Provided by | CNA |
Weaknesses
- CWE-522 — CWE-522 Insufficiently Protected Credentials
Affected products
| Vendor | Product | Versions |
|---|---|---|
| benoitc | hackney | 2.0.0 to <4.9.0 [affected] |
| benoitc | hackney | 8f944559bdb83da60b5c06f6cf6d842591278364 to <6548384b22ea196023a1963e2967d5715b6d9564 [affected] |
References
- https://github.com/benoitc/hackney/pull/979 (related)
- https://cna.erlef.org/cves/CVE-2026-113440.html (related)
- https://osv.dev/vulnerability/EEF-CVE-2026-113440 (related)
- https://github.com/benoitc/hackney/releases/tag/4.9.0 (vendor-advisory related)
- https://github.com/benoitc/hackney/commit/8f944559bdb83da60b5c06f6cf6d842591278364 (related)
- https://github.com/benoitc/hackney/commit/6548384b22ea196023a1963e2967d5715b6d9564 (patch)
Assess this vulnerability
Compare your deployed product and version with the source record. Review vendor references for fixes and workarounds. A CVSS score describes technical severity; it does not establish that your systems are affected or that exploitation has occurred.
Browse all CVE security advisories · Symaro cybersecurity services
Generated from the official CVE List on 27 Oct 2026 07:01 UTC.