CVE-2024-53990: AsyncHttpClient (AHC) library's `CookieStore` replaces explicitly defined `Cookie`s

Published Dec 2, 2024
·
Updated

Summary

When making any HTTP request, the automatically enabled and self-managed CookieStore (aka cookie jar) will silently replace explicitly defined Cookies with any that have the same name from the cookie jar. For services that operate with multiple users, this can result in one user's Cookie being used for another user's requests.

Details

This issue is described without security warnings here:

https://github.com/AsyncHttpClient/async-http-client/issues/1964

A PR to fix this issue has been made:

https://github.com/AsyncHttpClient/async-http-client/pull/2033

PoC

1. Add an auth Cookie to the CookieStore - This is identical to receiving an HTTP response that uses Set-Cookie, as shown in issue #1964 above. 2. Handle a different user's request where the same Cookie is provided as a passthrough, like a JWT, and attempt to use it by explicitly providing it. 3. Observe that the user's cookie in step 2 is passed as the Cookie in step 1.

Impact

This is generally going to be a problem for developers of backend services that implement third party auth features and use other features like token refresh. The moment a third party service responds by setting a cookie in the response, the CookieStore will effectively break almost every follow-up request (hopefully by being rejected, but possibly by revealing a different user's information).

If your service sets cookies based on the response that happens here, it's possible to lead to even greater levels of exposure.

Workaroud

You can avoid this issue by disabling the CookieStore during client creation:

java DefaultAsyncHttpClientConfig.Builder clientBuilder = Dsl.config() .setCookieStore(null) // other configuration ;

Other sources

The AsyncHttpClient (AHC) library allows Java applications to easily execute HTTP requests and asynchronously process HTTP responses. When making any HTTP request, the automatically enabled and self-managed CookieStore (aka cookie jar) will silently replace explicitly defined Cookies with any that have the same name from the cookie jar. For services that operate with multiple users, this can result in one user's Cookie being used for another user's requests.

— NVD

Affected Software

4 affected componentsFixes available
maven/org.asynchttpclient:async-http-client>=3.0.0.Beta1<3.0.1
3.0.1
maven/org.asynchttpclient:async-http-client>=2.1.0<2.12.4
2.12.4
debian/async-http-client*
debian/async-http-client<=2.12.3-1, <=2.12.3-1+deb12u1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade maven/org.asynchttpclient:async-http-client to a version that resolves this vulnerability.

    Fixed in 3.0.1
  2. Upgrade

    Upgrade maven/org.asynchttpclient:async-http-client to a version that resolves this vulnerability.

    Fixed in 2.12.4
  3. Configuration

    Disable the automatically enabled CookieStore during client creation by configuring the client builder with setCookieStore(null).

    AsyncHttpClient (AHC) CookieStore = null/disabled

Event History

Dec 2, 2024
CVE Published
via MITRE·05:10 PM
Data Sourced
via MITRE·05:10 PM
DescriptionWeakness
Data Sourced
via Red Hat·06:01 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·06:15 PM
DescriptionSeverityWeakness
Data Sourced
via OSV·06:15 PM
DescriptionSeverityAffected Software
Advisory Published
via GitHub·08:04 PM

Frequently Asked Questions

1

What is the severity of CVE-2024-53990?

CVE-2024-53990 is classified as a medium severity vulnerability.

2

How do I fix CVE-2024-53990?

To mitigate CVE-2024-53990, update the Async Http Client to version 3.0.1 or 2.12.4.

3

What impact does CVE-2024-53990 have on applications?

CVE-2024-53990 may lead to unauthorized cookie overwrites, causing improper session management for users.

4

Which versions of Async Http Client are affected by CVE-2024-53990?

CVE-2024-53990 affects versions of Async Http Client from 2.1.0 to 2.12.4 and 3.0.0.Beta1 to 3.0.1.

5

Is there a temporary workaround for CVE-2024-53990?

A temporary workaround for CVE-2024-53990 involves manually managing cookies to avoid relying solely on the automatic CookieStore.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203