/

CVE-2026-45300

Severity:

HIGH RISK

(7.4)

Cross-Origin Cookie Leakage (CWE-200) in AsyncHttpClient Redirect Handling

CVE-2026-45300

Analyzed

Vulnerability type

Category:

Information Exposure via Improper Header Handling

CWE:

CWE-200

Impact:

Sensitive Cookie Disclosure to Cross-Origin Redirect Targets

Severity:

HIGH RISK

(7.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

AsyncHttpClient (AHC) 2.x before 2.15.0 and 3.x before 3.0.10 improperly forward Cookie headers when following cross-origin redirects, exposing session identifiers and other sensitive cookie values to third-party domains.

Applications that rely on AHC for HTTP calls may unintentionally disclose authentication cookies or tracking tokens to attacker-controlled servers whenever a redirect chain crosses origins.

Affected context

This vulnerability affects Java applications using AsyncHttpClient 2.x and 3.x where:

  • HTTP requests may follow redirects automatically (3xx responses).
  • Redirect targets can point to different origins (scheme/host/port changes).
  • The application includes session or security-sensitive cookies in upstream requests, either via Cookie headers or AHC's cookie support.

The issue manifests specifically when the redirect chain moves from a trusted origin to an untrusted or attacker-controlled origin, and AHC forwards Cookie headers that were only intended for the original origin.

Exploit preconditions

  • Attack surface: Outbound HTTP requests made by the vulnerable Java application using AHC.
  • Required access: Ability to influence redirect responses, such as:
  • Controlling or compromising the initial HTTP endpoint.
  • Causing the application to call an endpoint that returns attacker-crafted 3xx redirects.
  • Trigger point: AHC automatically follows a 3xx redirect to a different origin, invoking propagatedHeaders() in Redirect30xInterceptor.java.
  • Why exploitation is possible: The redirect interceptor strips Authorization and Proxy-Authorization headers on cross-origin redirects but fails to strip Cookie headers, allowing cookies scoped to the original origin to be sent to the new origin.

Why this happens

At its core, this is an information exposure issue caused by incomplete header sanitization during redirect handling.

The redirect logic in AsyncHttpClient correctly recognizes that certain headers (e.g., Authorization, Proxy-Authorization) must not be forwarded to cross-origin targets, but it does not apply the same origin-aware filtering to Cookie headers.

As a result, cookies that are semantically bound to the original origin are propagated across origin boundaries, violating the principle of origin isolation and leading to CWE-200: Information Exposure through inadvertent disclosure of authentication and session data.

Conceptually, the bug arises from treating redirect chains as a single trust context rather than re-evaluating which headers remain valid and safe for each new origin.

Potential impact

  • Leakage of session cookies that may allow impersonation of application users in other contexts.
  • Exposure of authentication-related cookies (e.g., JWTs or session IDs embedded in cookies) to attacker-controlled servers.
  • Disclosure of user identifiers, tracking cookies, and personalization tokens that can be used for profiling or targeted attacks.
  • Facilitation of phishing or session fixation attacks by combining leaked cookies with other weaknesses.
  • Undermining of privacy guarantees and regulatory compliance due to cross-origin data exposure.

General mitigation guidance

Effective mitigation focuses on reducing trust in automatic redirect handling and tightening header propagation rules:

  • Treat cross-origin redirects as untrusted boundaries and avoid forwarding cookies unless they are explicitly intended for the target origin.
  • Introduce an origin-aware filter for outgoing headers that removes or rewrites Cookie headers when the redirect target's origin differs from the original request.
  • Prefer strict cookie scoping and minimal cookie contents, limiting security-sensitive data (such as raw session identifiers) stored in cookies that may be sent programmatically.
  • Use least-privilege design for outbound HTTP clients: disable automatic redirects by default where business logic can instead validate and follow redirects selectively.
  • Centralize HTTP client configuration in the application so that any header-propagation rules, including cookie handling, are consistently applied across all outbound calls.

How teams detect issues like this

Organizations can identify and monitor this class of issue with a mix of code-level and runtime strategies:

  • Static analysis / code review:
  • Search for AsyncHttpClient usage where redirect following is enabled without explicit origin checks.
  • Review custom interceptors and header-propagation code for lack of origin-aware filtering of Cookie headers.
  • Flag patterns that automatically forward all request headers across redirects.
  • Security-focused code review checklists:
  • Include explicit questions about cross-origin redirects and header propagation, especially for cookies and authorization headers.
  • Dynamic analysis and logging:
  • Enable detailed HTTP client logging in test/staging environments to trace headers across redirect chains and detect cookies being sent to unexpected domains.
  • Use outbound traffic inspection or egress proxies to identify when application cookies are transmitted to non-whitelisted origins.
  • Automated dependency analysis tools can also highlight known vulnerabilities in HTTP client libraries, prompting review and hardening of redirect handling logic.

Sources

SourceLink
github.comgithub.com/AsyncHttpClient/async-http-client/commit/3b0e3e9e
github.comgithub.com/AsyncHttpClient/async-http-client/releases/tag/async-http-client-project-3.0.10
github.comgithub.com/AsyncHttpClient/async-http-client/security/advisories/GHSA-fmxf-pm6p-7xgm

Frequently asked

questions

Yes. If an attacker can control or influence an HTTP endpoint that the application calls using AsyncHttpClient, they can return redirect responses to a domain they control and receive the leaked Cookie headers.

The attacker needs the ability to cause the vulnerable application to make a request to a redirecting endpoint they control or influence. This can be through a compromised upstream service, a malicious service integrated by configuration, or user-supplied URLs that the server-side code fetches.

The safest pattern is to enforce strict origin-aware header filtering during redirects: do not forward Cookie headers (or other sensitive headers) when the redirect target's origin differs from the original origin, and consider disabling automatic redirect following where possible so application logic can decide what to send.

Design redirect handling with explicit trust boundaries: treat each origin transition as a security-sensitive event, define clear policies for which headers are allowed to cross origins, minimize sensitive data in automatically attached headers, and incorporate these rules into library defaults rather than leaving them to application code.

Find out what's already
exploitable in your codebase.