Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessInduce client request with credentials
-
ExploitServe same-host scheme/port redirect
-
Executionhackney reissues request with auth headers
-
ImpactRead credentials via cleartext or rogue port
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V6 - Authentication Credential protection in transit/storage
|
| Exploitation Conditions | Requires the application to call hackney with follow_redirect enabled (an opt-in option, not the default) AND to attach credentials via the basic_auth and/or cookie options on the request. The attacker must be able to make a server on the target host return a same-host redirect that either downgrades the scheme (https→http) - exploitable by an on-path attacker who then reads the cleartext Authorization/Cookie headers - or changes the port, handing the credentials to a different service on the same host. Limiting factors: non-default follow_redirect configuration, credentials must actually be present on the request, the host must be influenced to emit the downgrading/port-changing redirect, and the cleartext-read variant additionally needs on-path network position. The location_trusted mode forwards credentials to any target by design and is out of scope. Affects hackney 2.0.0 up to (not including) 4.9.0. |
| Impact | This is a medium-severity credential-exposure flaw (CVSS 4.0 base 6.0; VC:H with VI/VA:N - confidentiality-only impact). The CVSS 4.0 vector shows AV:N but materially qualifies it: AT:P (a specific attack requirement must be met) and UI:P (passive interaction by the credential-bearing client). PR:N indicates the attacker needs no credentials of their own against the hackney client. No EPSS score and no KEV listing were supplied, so there is no active-exploitation signal: exploitation status is 'no public exploit identified at time of analysis' (the provided references are the vendor PR, advisory, and patch commits - fix artifacts, not a weaponized PoC). The vuln.today Decision label is 'this_month', consistent with a real-but-not-emergency priority: this is a genuine credential-leak bug, not merely a high-CVSS-but-low-real-risk issue, but it is bounded by several preconditions (follow_redirect enabled, credentials actually present on the request, and an attacker able to influence a same-host redirect and/or hold an on-path position). The confidentiality impact is high because basic_auth and cookie credentials can be disclosed, but there is no integrity or availability impact. Net: patch within normal maintenance cadence (this month), treat as elevated for any service that uses hackney with follow_redirect against hosts that can be influenced to downgrade scheme or change port. |
| Exploit ScenarioDerived | An application using hackney with follow_redirect enabled issues an authenticated request (basic_auth and/or cookie) to a host; a malicious or compromised redirecting server on that host responds with a 30x redirect to the same hostname but a different scheme (https→http) or a different port. Because the pre-4.9.0 code compared only the hostname, hackney reissues the request with the Authorization and Cookie headers intact - an on-path attacker then reads them in cleartext over the http downgrade, or a different service listening on the other port receives them directly. No public exploit identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 26, 2026
Credential leakage in Erlang hackney before 4.9.0 can expose HTTP basic_auth and cookie values when an application enables follow_redirect and a server returns a same-host redirect that changes scheme or port. The redirect handling compared only the hostname, so an https-to-http downgrade resent Authorization and Cookie headers in cleartext for an on-path attacker, while a same-host port change handed them to another service. The independent assessment rates this as medium severity (CVSS:3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N); no public exploit was identified at time of analysis.
RemediationAI
Upgrade hackney to 4.9.0, the vendor-released fixed version, per https://github.com/benoitc/hackney/releases/tag/4.9.0 and the advisory at https://cna.erlef.org/cves/CVE-2026-113440.html; the fix is also visible in PR https://github.com/benoitc/hackney/pull/979 and commits https://github.com/benoitc/hackney/commit/8f944559bdb83da60b5c06f6cf6d842591278364 and https://github.com/benoitc/hackney/commit/6548384b22ea196023a1963e2967d5715b6d9564. If upgrading immediately is not possible, disable follow_redirect and handle redirects manually with scheme, hostname, and port validation before reissuing credentials, or avoid attaching basic_auth and cookie options to requests that may follow redirects; these workarounds require application changes and lose automatic redirect convenience. The location_trusted option forwards credentials by design and is not a mitigation.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
hackney is an Erlang HTTP client. The flaw is CWE-522 (insufficiently protected credentials): src/hackney.erl's maybe_strip_auth_on_redirect/3 decided whether to keep basic_auth and cookie options by comparing only the redirect source and target hostnames. That allowed a same-host redirect from https to http to reissue the request with Authorization and Cookie headers over cleartext, and a same-host redirect to another port to deliver those credentials to a different service. The patch in PR 979 replaces the host-only check with same_origin/2, comparing scheme, case-insensitive host, and port, matching the origin model referenced for hackney_h3:same_origin/2. The location_trusted option remains intentionally permissive and forwards credentials to any target by design. The trigger is the server-supplied redirect Location target; no other trigger mechanism is described in the available sources.
Know when Hackney gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
AC:H because exploitation needs an attacker-influenced same-host scheme/port redirect (and often on-path position) plus follow_redirect and credentials present; PR:N/UI:N as the hackney client needs no attacker auth or active user action; C:H only, no I/A impact.
Primary rating from Vendor (EEF).
CVSS VectorVendor: EEF
DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Denial of service in benoitc hackney (Erlang HTTP client) versions 2.0.0 through 4.0.0 allows a malicious WebSocket serv
Denial of service in benoitc hackney (Erlang HTTP client) 2.0.0 through 4.0.0 allows remote unauthenticated attackers to
Denial-of-service in benoitc's hackney Erlang HTTP client (versions 2.0.0-beta.1 through 4.0.0) allows any HTTP origin s
Remote denial of service in benoitc hackney 2.0.0 through 4.0.0 lets a malicious HTTP/3 server exhaust a client's BEAM p
Denial of service in benoitc hackney (Erlang HTTP client) versions 0.10.0 through 4.0.0 lets a hostile SOCKS5 or HTTP CO
CRLF injection in hackney (Erlang HTTP client, versions 2.0.0-4.0.1) enables header injection into outbound WebSocket up
SSRF allowlist bypass in hackney (Erlang HTTP client) versions 0.13.0 through before 4.0.1 allows attackers who control
HTTP Request Splitting via CRLF injection in hackney, the Erlang/Elixir HTTP client library, allows an attacker who cont
Credential leakage in the hackney Erlang HTTP client library (versions 3.1.1 through before 4.0.1) allows a malicious or
Improper certificate validation in the Erlang HTTP client hackney (1.24.0 through 4.8.x) lets an on-path attacker impers
Memory exhaustion in the Erlang hackney HTTP client (2.0.0-beta.1 through 4.8.x) lets any server the client requests for
Server-side request forgery in the Erlang hackney HTTP client (versions 4.0.1 up to but not including 4.9.0) lets an att
EUVD-2026-109835
GHSA-m347-hm9w-wwv9
NVD
CVE.org
EPSS
Exploit-DB