MEDIUM 4.0

CVE-2026-55688: AsyncHttpClient Cookie Injection Vulnerability – Patch Guidance

AsyncHttpClient (AHC), a widely-used Java library for handling HTTP requests, contains a cookie injection vulnerability in versions 2.0.0–2.15.x and 3.0.0.Beta1–3.0.10. The flaw allows a malicious server to plant cookies intended for unrelated domains into the client's cookie store. When the affected application later communicates with the legitimate domain, it unwittingly sends the attacker-injected cookie. This attack succeeds only when a single AHC instance handles connections to both an attacker-controlled server and a trusted destination—a common pattern in applications that pool HTTP clients across multiple hosts.

Source data · NVD / CISA · public domain

CVSS
3.1 · 4.0 MEDIUM · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N
Weaknesses (CWE)
CWE-1275
Affected products
0 configuration(s)
Published / Modified
2026-07-01 / 2026-08-06

NVD description (verbatim)

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.

3 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The ThreadSafeCookieStore class in AsyncHttpClient fails to validate the Domain attribute of Set-Cookie headers against RFC 6265 restrictions. Specifically, it does not verify that the responding host is authorized to set cookies for a given domain before accepting and storing them. An attacker can craft a Set-Cookie response with an arbitrary Domain value; the library will store this cookie and automatically attach it to subsequent requests matching that domain. The vulnerability affects two release lines: versions 2.0.0 through 2.15.x, and versions from 3.0.0.Beta1 through 3.0.10. Remediation is available in AHC 2.16.0 and 3.0.11, which enforce proper domain validation during cookie acceptance.

Business impact

Organizations using AsyncHttpClient for multi-domain HTTP operations face session hijacking and request forgery risks. An attacker who can intercept or control a connection to any server that your application contacts—whether directly or through a supply chain dependency—can inject cookies targeting your internal or external trusted services. If that trusted service relies on cookies for authentication or authorization decisions, the injected cookie may grant unauthorized access or facilitate lateral movement. The impact scales with the number of distinct hosts your application communicates with; applications talking to untrusted or user-controlled endpoints are at elevated risk.

Affected systems

All Java applications using AsyncHttpClient versions 2.0.0–2.15.x or 3.0.0.Beta1–3.0.10 are affected, provided they create a single, shared client instance (or rely on the library's default shared instance) to reach multiple hosts. Direct consumers of the AHC library are the primary target, but downstream applications that depend on libraries that embed AsyncHttpClient are also in scope. Verify your application's dependency tree and AHC version to confirm exposure.

Exploitability

The vulnerability requires the attacker to control or influence a host that your application connects to and to craft a malicious Set-Cookie response. The attack does not require user interaction or elevated privileges. However, practical exploitation depends on application architecture: only applications that pool a single HTTP client across multiple origins are vulnerable. The CVSS score of 4.0 (Medium) reflects this constraint, as the attack has moderate attack complexity and limited immediate consequence (integrity impact only, no confidentiality or availability loss from the cookie injection alone).

Remediation

Upgrade AsyncHttpClient to version 2.16.0 or later for the 2.x series, or to version 3.0.11 or later for the 3.x series. These versions implement proper domain validation in the cookie store, preventing acceptance of cookies from hosts unauthorized to set them. After upgrading, no configuration changes are necessary; the fix operates transparently. If you cannot upgrade immediately, consider using a per-host CookieStore (if your application architecture permits) to isolate cookies between untrusted and trusted endpoints.

Patch guidance

1. Audit your dependencies to identify all direct and transitive uses of AsyncHttpClient. Use build-time dependency scanning (Maven, Gradle plugins) to surface the current version. 2. Plan a staged upgrade to AHC 2.16.0 or 3.0.11, beginning with non-production environments. 3. Review your application's HTTP client initialization: confirm whether you are using a shared, default CookieStore or per-host instances. 4. Test cookie-based authentication flows in your trusted services post-upgrade to ensure no regression. 5. If you maintain libraries that embed AsyncHttpClient, release a patch version with the updated dependency and notify your consumers.

Detection guidance

Monitor HTTP request logs for anomalous Set-Cookie headers originating from external or less-trusted services. Cross-reference the Domain attribute in responses against the Host header of the request: a mismatch may indicate an injection attempt. Application-level logging of cookie operations (where feasible) can help correlate suspicious cookie additions with specific HTTP responses. Additionally, runtime dependency scanning tools can flag AsyncHttpClient versions below 2.16.0 or 3.0.11 as needing remediation.

Why prioritize this

Although the CVSS score is moderate (4.0), the practical risk to most applications is lower because successful exploitation requires a shared client instance and attacker control of an upstream host. However, if your application handles sensitive authentication or communicates with user-supplied or third-party URLs, prioritize patching to close the vector. The fix is low-risk (a pure validation improvement) and has been available since July 2026, reducing deployment friction.

Risk score, explained

The CVSS 3.1 score of 4.0 Medium reflects low attack complexity, no privilege requirement, and network-based attack vector, but recognizes that the scope is changed (cookies affect cross-domain behavior) and the immediate integrity impact is limited to injection, not full compromise. The score penalizes exploitability because applications must satisfy a specific architectural condition (shared client, multi-host usage) and the attacker must control or influence a contacted host. Real-world risk is context-dependent: applications handling authentication or high-value transactions are at the upper end of the Medium range.

Frequently asked questions

We use AsyncHttpClient but through a third-party library dependency. Are we affected?

Likely yes. Check the version of AsyncHttpClient that the third-party library declares. If it is below 2.16.0 or 3.0.11, you are affected. Contact the upstream library maintainer to request an upgrade, or evaluate whether you can force-upgrade AsyncHttpClient in your own dependency tree if license and compatibility constraints allow.

Does this vulnerability allow an attacker to steal cookies from our application?

No. The vulnerability allows an attacker to inject cookies into your application's store, not to exfiltrate existing cookies. The attacker must control a host that your application connects to. The injected cookies are then sent on subsequent requests to unrelated domains, potentially granting the attacker unauthorized access to those domains if they rely on cookies for authentication.

We create a separate CookieStore for each host we connect to. Are we still vulnerable?

No. Per-host CookieStore isolation prevents a malicious server from injecting cookies that would be sent to other hosts. If your application already isolates cookies by host or origin, you have a defense-in-depth measure in place, though upgrading remains recommended as a best practice.

What is the difference between versions 2.x and 3.x, and which should we target?

AsyncHttpClient 3.x is the newer active branch with ongoing feature development. Version 2.x is maintained for backward compatibility but will eventually reach end-of-life. If your application is already on 3.x, upgrade to 3.0.11 or later. If you are on 2.x, upgrade to 2.16.0 or later. Both branches receive the same security fix. Plan migration to 3.x over the longer term if you are on 2.x, as it offers better performance and feature support.

This analysis is based on CVE-2026-55688 public disclosure and vendor advisories as of August 2026. Patch version numbers, affected versions, and severity assessment are current as of the modification date (2026-08-06) and reflect information from the CVE record. Organizations should verify the latest patch availability and release notes from the AsyncHttpClient project before deployment. SEC.co provides this intelligence for informational purposes and does not warrant completeness or fitness for any specific use case. Conduct your own risk assessment and testing in isolated environments before production rollout. Source: NVD (public-domain), retrieved 2026-08-10. Analysis generated by SEC.co (claude-haiku-4-5).