# CVE-2026-113440: HTTP/1.1 and HTTP/2 redirects resend basic_auth and cookie to a different scheme or port in hackney

Status: published. Published: 2026-10-26. Updated: 2026-11-02.

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.

## Remediation

- workaround: 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: CNA: EEF)
- fix: The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches. (source: CNA: EEF) — https://github.com/benoitc/hackney/commit/6548384b22ea196023a1963e2967d5715b6d9564

## Affected products and versions

- benoitc / hackney (hackney): ≥ 2.0.0; < 4.9.0 (affected, semver). Source: CNA: EEF
- benoitc / hackney (benoitc/hackney): ≥ 8f944559bdb83da60b5c06f6cf6d842591278364; < 6548384b22ea196023a1963e2967d5715b6d9564 (affected, git). Source: CNA: EEF

## Severity and prioritization

- CVSS 4.0: 6 (medium); 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; source: CNA: EEF

- CVSS 4.0: 6 (medium); 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X; source: NVD: 6b3ad84c-e1a6-4bf7-a703-f496b71e49db

- CISA KEV: No listing in collected sources

- EPSS: 0.31% as of 2026-11-02; percentile 24.23%

- SSVC: exploitation none; automatable no; technical impact partial; source ADP: CISA-ADP

- Weaknesses: CWE-522

## Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

## References

- https://github.com/benoitc/hackney/pull/979 (CNA: EEF; related)

- https://cna.erlef.org/cves/CVE-2026-113440.html (CNA: EEF; related)

- https://osv.dev/vulnerability/EEF-CVE-2026-113440 (CNA: EEF; related)

- https://github.com/benoitc/hackney/releases/tag/4.9.0 (CNA: EEF; vendor-advisory, related)

- https://github.com/benoitc/hackney/commit/8f944559bdb83da60b5c06f6cf6d842591278364 (CNA: EEF; related)

- https://github.com/benoitc/hackney/commit/6548384b22ea196023a1963e2967d5715b6d9564 (CNA: EEF; patch)

- https://cna.erlef.org/cves/CVE-2026-113440.html (6b3ad84c-e1a6-4bf7-a703-f496b71e49db)

- https://github.com/benoitc/hackney/commit/6548384b22ea196023a1963e2967d5715b6d9564 (6b3ad84c-e1a6-4bf7-a703-f496b71e49db)

- https://github.com/benoitc/hackney/commit/8f944559bdb83da60b5c06f6cf6d842591278364 (6b3ad84c-e1a6-4bf7-a703-f496b71e49db)

- https://github.com/benoitc/hackney/pull/979 (6b3ad84c-e1a6-4bf7-a703-f496b71e49db)

- https://github.com/benoitc/hackney/releases/tag/4.9.0 (6b3ad84c-e1a6-4bf7-a703-f496b71e49db)

- https://osv.dev/vulnerability/EEF-CVE-2026-113440 (6b3ad84c-e1a6-4bf7-a703-f496b71e49db)

## Provenance

- CNA: EEF: https://www.cve.org/CVERecord?id=CVE-2026-113440; retrieved 2026-11-02; source updated 2026-11-02

- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-113440; retrieved 2026-11-03; source updated 2026-11-02

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2026-113440; retrieved 2026-11-02; source updated Not reported

Revision: f566f47003f2d7f0bfefdf0e49ec8e07443459bbf68fc55e08b6a206d0e1d5dc

Canonical: https://y2.dev/cve/CVE-2026-113440

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.