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

> Attackers can hijack user sessions because the library silently replaces explicit cookies with those from the shared cookie jar.

- **Severity:** Critical 9.2 (`CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 2 Dec 2024
- **Updated:** 4 Dec 2024
- **Also known as:** DEBIAN-CVE-2024-53990, GHSA-mfj5-cf8g-g2fv, MINI-82f8-rc8h-58m5, MINI-q6c5-4j5r-qhvh, UBUNTU-CVE-2024-53990

## What is CVE-2024-53990?

CVE-2024-53990 is a critical authentication bypass vulnerability in AsyncHttpClient async-http-client, published on 2 Dec 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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.

Weakness: CWE-287 (Improper Authentication)

## Which versions are affected by CVE-2024-53990?

4 open source packages ship an affected version, including org.asynchttpclient:async-http-client.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.asynchttpclient:async-http-client` | Maven | From 2.1.0 | 2.12.4 |
| `org.asynchttpclient:async-http-client` | Maven | From 2.1.0 | 2.12.4 |
| `org.asynchttpclient:async-http-client` | Maven | From 3.0.0.Beta1 | 3.0.1 |
| `org.asynchttpclient:async-http-client` | Maven | From 3.0.0.Beta1 | 3.0.1 |

## How do I fix CVE-2024-53990?

Upgrade org.asynchttpclient:async-http-client to a fixed version for your release line: 2.12.4 or 3.0.1.

## Is CVE-2024-53990 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-53990 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-53990 and fix it if it is affected.

What it is: CVE-2024-53990 is a critical authentication bypass vulnerability in AsyncHttpClient async-http-client, published on 2 Dec 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-53990 exists.

Affected packages and fixed versions:
- org.asynchttpclient:async-http-client (Maven): affected from 2.1.0; fixed in 2.12.4
- org.asynchttpclient:async-http-client (Maven): affected from 2.1.0; fixed in 2.12.4
- org.asynchttpclient:async-http-client (Maven): affected from 3.0.0.Beta1; fixed in 3.0.1
- org.asynchttpclient:async-http-client (Maven): affected from 3.0.0.Beta1; fixed in 3.0.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-53990/ (Markdown: https://insights.sbomify.com/CVE-2024-53990/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-53990
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-53990
- OSV: https://osv.dev/vulnerability/CVE-2024-53990

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-53990/
Summaries are generated and may contain mistakes; the official description above is the record.
