GHSA-xr57-gcx8-52hf: Medium severity maven/org.asynchttpclient:async-http-client vulnerability
Impact When a request uses an HTTP proxy to reach an HTTPS origin, the client opens the tunnel with a plaintext CONNECT sent to the proxy before any TLS exists. On affected versions the origin's preemptive credentials were added to that CONNECT. A Basic realm sent Authorization: Basic base64(user:pass) to the proxy in the clear, and NTLM, SPNEGO or Kerberos realms sent their token. The proxy, and anyone who can read the client to proxy hop, saw credentials that were meant only for the origin.
Affected versions 3.x: up to and including 3.0.11 2.x: up to and including 2.16.0
Patches Fixed in 3.0.12 on the 3.x line and in 2.16.1 on the 2.x line. The origin Basic or Digest Authorization is no longer put on the CONNECT; it is added to the tunnelled request once the tunnel is up. The per-connection NTLM, Kerberos and SPNEGO token is likewise no longer attached on the tunnel path; it never reached the origin there in any case, and the challenge flow still negotiates it inside the tunnel.
Workarounds Do not use preemptive origin authentication together with an HTTP proxy, or reach the origin without a CONNECT proxy.
Details NettyRequestFactory added the origin Authorization to every request it built, including the CONNECT, and NettyRequestSender did the same for the per-connection NTLM or SPNEGO token in sendRequestWithNewChannel. Both now skip the CONNECT.
Note that 3.0.12 is itself affected by a separate issue, GHSA-rqf5-2wxv-rjf4, where a Digest challenge the client cannot read downgrades to Basic and sends the password in cleartext. Upgrade to 3.0.13 to pick up both fixes.
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
(HTTP proxy client using NettyRequestFactory/NettyRequestSender)to a version that resolves this vulnerability.Fixed in 2.16.1 - Upgrade
Upgrade
(HTTP proxy client using NettyRequestFactory/NettyRequestSender)to a version that resolves this vulnerability.Fixed in 3.0.12 - Upgrade
Upgrade
(HTTP proxy client using NettyRequestFactory/NettyRequestSender)to a version that resolves this vulnerability.Fixed in 3.0.13 - Configuration
Do not use preemptive origin authentication together with an HTTP proxy.
HTTP proxy origin authentication preemptive origin authentication (preemptive Authorization) = do not use - Compensating control
Do not reach the origin without a CONNECT proxy (i.e., ensure the HTTP proxy CONNECT tunnel is used before the HTTPS request is sent to the origin).
Event History
Frequently Asked Questions
Which deployments are exposed to credential disclosure?
Deployments are exposed when they use an HTTP proxy to reach an HTTPS origin through a CONNECT tunnel and use preemptive authentication for that origin. The affected client sends origin credentials or authentication tokens in the plaintext CONNECT request to the proxy.
Who can obtain the leaked credentials?
The HTTP proxy can see the credentials or token. Anyone able to read the network hop between the client and proxy can also observe them because CONNECT is sent before TLS is established.
What authentication mechanisms are affected?
Preemptive Basic authentication can expose the base64-encoded username and password. Preemptive NTLM, SPNEGO, and Kerberos authentication can expose their associated tokens.
How can I determine whether a deployment needs remediation?
Check whether async-http-client is version 3.0.11 or earlier on the 3.x line, or 2.16.0 or earlier on the 2.x line, and whether it combines preemptive origin authentication with an HTTP CONNECT proxy. Upgrade to 3.0.12 or 2.16.1, or avoid that configuration until patching is possible.