CVE-2026-113440: hackney insufficiently protected credentials in redirect

CVE-2026-113440 · Severity: info · Published 2026-10-26

hackney is an HTTP client library used in Erlang applications. When follow_redirect is enabled, a malicious server can trick the client into sending authentication credentials and cookies in cleartext by redirecting traffic from HTTPS to HTTP on the same hostname, or to a different port on the same host, allowing an attacker to intercept sensitive credentials.

Technologies: Benoitc Hackney. Vendors: Benoitc.

Quick answers

Is CVE-2026-113440 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-113440 being exploited in the wild.
How severe is CVE-2026-113440?
Informational severity, published 26 October 2026.
Which products and versions are affected?
Benoitc Hackney 2.0.0 before 4.9.0.
Is there a fix for CVE-2026-113440?
Yes: fixed in 4.9.0. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-113440 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-113440?
Check whether you run Benoitc Hackney at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Fixed in: 4.9.0

Technical details

The vulnerability exists in hackney's redirect handling: hackney:follow_redirect/10 reissues requests to the Location target after calling hackney:maybe_strip_auth_on_redirect/3, which only compares hostnames but fails to validate scheme changes or port changes. Authorization and Cookie headers are preserved across same-host redirects from HTTPS to HTTP or to alternate ports, exposing credentials in cleartext or to unintended services. The location_trusted option forwards credentials to any target by design and is not affected by this fix.

Affected products

  • benoitc hackney 2.0.0 before 4.9.0

Timeline

  • 2026-10-26: disclosed

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.