CVE-2026-85717: AsyncHttpClient: Client-wide realm credentials re-sent to a cross-origin redirect target
Impact A client configured with a client-wide realm (a Realm set on the config builder rather than on an individual request) and following redirects could re-send those credentials to a redirect target on a different origin. The redirect code strips the per-exchange realm, but when the target answered 401 the credentials were re-derived from the client config, handing Basic or Digest credentials, or a Negotiate or NTLM token, to an attacker controlled origin. This is a residual of the earlier cross-origin credential leak advisories, whose strip this bypassed.
Affected versions 3.x: 3.0.9 through 3.0.11 2.x: 2.14.5 through 2.16.0
Releases below those floors are covered by the earlier advisories GHSA-cmxv-58fp-fm3g and GHSA-fmxf-pm6p-7xgm: the cross-origin strip that this issue bypasses did not exist yet, so the leak there is the original one rather than this residual.
Patches Fixed in 3.0.12 on the 3.x line and in 2.16.1 on the 2.x line. The realm is taken from the per-exchange state that the redirect already cleared, rather than being re-derived from the client configuration.
Workarounds Set the Realm on the individual request instead of on the client configuration. A per-request realm is stripped correctly on a cross-origin redirect while still authenticating same-origin, so this is a complete workaround with no loss of function. Turning off follow-redirects also avoids it. Note that setStripAuthorizationOnRedirect(true) is not a workaround: it forces the strip, but the configuration fallback re-derived the realm regardless.
Details The interceptor read the realm as the request's realm or, failing that, the client configuration's realm, which re-attached the config realm after the redirect strip had cleared it. It now reads the realm held on the response future. See also GHSA-cmxv-58fp-fm3g and GHSA-fmxf-pm6p-7xgm.
Other sources
The AsyncHttpClient (AHC) library allows Java applications to easily execute HTTP requests and asynchronously process HTTP responses. From 2.14.5 to 2.16.0 and from 3.0.9 to 3.0.11, a client configured with a client-wide Realm and redirect following can disclose credentials after a cross-origin redirect because the Interceptors authentication path falls back to the client configuration after redirect handling clears the per-exchange realm. If the attacker-controlled target returns 401, the client can send Basic or Digest credentials or a Negotiate or NTLM token to that origin. Per-request realms are stripped correctly, and this issue is a residual bypass of the earlier cross-origin credential-stripping fixes. This issue is fixed in versions 2.16.1 and 3.0.12.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
maven/org.asynchttpclient:async-http-clientto a version that resolves this vulnerability.Fixed in 2.16.1 - Upgrade
Upgrade
maven/org.asynchttpclient:async-http-clientto a version that resolves this vulnerability.Fixed in 3.0.12 - Upgrade
Upgrade
AsyncHttpClientto a version that resolves this vulnerability.Fixed in 3.0.12 - Upgrade
Upgrade
AsyncHttpClientto a version that resolves this vulnerability.Fixed in 2.16.1 - Configuration
Avoid the vulnerable redirect handling by disabling follow-redirects (turn off redirect following).
AsyncHttpClient follow-redirects = false - Configuration
Use a per-request Realm (set Realm on the individual request rather than on the client configuration / config builder).
AsyncHttpClient Realm configuration = set on individual request
Event History
Frequently Asked Questions
Which applications are exposed to credential disclosure?
Applications using AsyncHttpClient 2.14.5 through 2.16.0 or 3.0.9 through 3.0.11 are exposed when they enable redirect following and configure a client-wide Realm. Applications using per-request realms are not affected by this bypass because those realms are stripped correctly on cross-origin redirects.
What must an attacker be able to do to trigger the leak?
The client must follow a redirect to an attacker-controlled cross-origin target. That target must return HTTP 401, which can cause the client to send Basic or Digest credentials, or a Negotiate or NTLM token, from the client-wide Realm to the attacker-controlled origin.
What should teams do if they cannot upgrade immediately?
Disable redirect following or avoid configuring credentials through a client-wide Realm. Use per-request realms instead, as they are stripped correctly during cross-origin redirects.
How can I remediate the issue?
Upgrade AsyncHttpClient to version 2.16.1 or later on the 2.x line, or version 3.0.12 or later on the 3.x line.