4.0medium
AsyncHttpClient: Cookie stored for an unrelated domain (cookie tossing) via ThreadSafeCookieStore
- Severity
- 4.0medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.29% (higher than 22% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-m452-q8c9-rg2f
Description
The AsyncHttpClient (AHC) library allows Java applications to easily execute HTTP requests and asynchronously process HTTP responses. In versions from 2.0.0 prior to 2.16.0 and from 3.0.0.Beta1 prior to 3.0.11, ThreadSafeCookieStore stored a cookie under the value of its Domain attribute without verifying that the responding host is allowed to set a cookie for that domain, leading to a cookie tossing / cookie injection issue. A host the client connects to can therefore plant a cookie scoped to an unrelated domain, and the client will then send that cookie on later requests to that domain. Applications that use a single AsyncHttpClient instance - and thus the default, shared CookieStore - to reach both an attacker-influenced host and a trusted host are impacted. This issue has been fixed in versions 2.16.0 and 3.0.11.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| AsyncHttpClient async-http-client | >= 2.0.0, < 2.16.0, >= 3.0.0.Beta1, < 3.0.11 | CVE List |
| org.asynchttpclient:async-http-client (Maven) | from 3.0.0.Beta1 before 3.0.11, from 2.0.0 before 2.16.0 | GitHub Advisory Database |
All scores
| GitHub_M | 4.0medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N |
| GitHub | 4.0medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
The AsyncHttpClient (AHC) library allows Java applications to easily execute HTTP requests and asynchronously process HTTP responses. In versions from 2.0.0 prior to 2.16.0 and from 3.0.0.Beta1 prior to 3.0.11, ThreadSafeCookieStore stored a cookie under the value of its Domain attribute without verifying that the responding host is allowed to set a cookie for that domain, leading to a cookie tossing / cookie injection issue. A host the client connects to can therefore plant a cookie scoped to an unrelated domain, and the client will then send that cookie on later requests to that domain. Applications that use a single AsyncHttpClient instance - and thus the default, shared CookieStore - to reach both an attacker-influenced host and a trusted host are impacted. This issue has been fixed in versions 2.16.0 and 3.0.11.
GitHub Advisory Database
Impact
A cookie tossing / cookie injection issue (CWE-1275). ThreadSafeCookieStore stored a cookie under the value of its Domain attribute without verifying that the responding host is allowed to set a cookie for that domain (RFC 6265 §5.3 step 6). A host the client connects to can therefore plant a cookie scoped to an unrelated domain, and the client will then send that cookie on later requests to that domain.
Who is Impacted
Applications that use a single AsyncHttpClient instance - and thus the default, shared CookieStore - to reach both an attacker-influenced host and a trusted host. Typical exposure: crawlers, link-preview / webhook fetchers, SSRF-style "fetch this URL" features, multi-backend aggregators, or following redirects to an attacker-controlled host. The attacker can write a cookie the client presents to the victim host (session fixation, overwriting a session id / CSRF-token cookie); they cannot read the victim host's cookies. Applications that talk only to a fixed trusted backend, or that disable/scope the cookie store, are not exposed.
Patches
Fixed in 3.0.11 and 2.16.0
Workarounds
- Disable the cookie store (setCookieStore(null)) when cookies are not needed; or
- Use a separate AsyncHttpClient (separate cookie store) per trust domain so an attacker-influenced host and a trusted host never share a jar
- Supply a custom CookieStore whose add(Uri, Cookie) rejects cookies whose Domain is not domain-matched by the request host.
NVD (es)
La biblioteca AsyncHttpClient (AHC) permite a las aplicaciones Java ejecutar fácilmente solicitudes HTTP y procesar asincrónicamente respuestas HTTP. En las versiones desde la 2.0.0 anterior a la 2.16.0 y desde la 3.0.0.Beta1 anterior a la 3.0.11, ThreadSafeCookieStore almacenaba una cookie bajo el valor de su atributo Domain sin verificar que el host que responde tiene permiso para establecer una cookie para ese dominio, lo que lleva a un problema de cookie tossing / inyección de cookies. Un host al que el cliente se conecta puede, por lo tanto, colocar una cookie con ámbito en un dominio no relacionado, y el cliente enviará entonces esa cookie en solicitudes posteriores a ese dominio. Las aplicaciones que utilizan una única instancia de AsyncHttpClient - y, por lo tanto, el CookieStore predeterminado y compartido - para acceder tanto a un host influenciado por un atacante como a un host de confianza se ven afectadas. Este problema ha sido solucionado en las versiones 2.16.0 y 3.0.11.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-55688 changed 2026-08-06 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-m452-q8c9-rg2f changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-55688 changed 2026-10-25 | Public domain |