# CVE-2026-40490: AsyncHttpClient leaks authorization credentials to untrusted domains on cross-origin redirects

> AsyncHttpClient leaks authorization credentials to untrusted domains during cross-origin redirects, allowing attackers to capture sensitive tokens and credentials.

- **Severity:** Medium 6.8 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 18 Apr 2026
- **Updated:** 20 Apr 2026
- **Also known as:** CLEANSTART-2026-VY64057, CLEANSTART-2026-XH67541, DEBIAN-CVE-2026-40490, ECHO-2935-4daa-b367, GHSA-cmxv-58fp-fm3g, UBUNTU-CVE-2026-40490

## What is CVE-2026-40490?

CVE-2026-40490 is a medium-severity vulnerability in AsyncHttpClient async-http-client, published on 18 Apr 2026. 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 redirect following is enabled (followRedirect(true)), versions of AsyncHttpClient prior to 3.0.9 and 2.14.5 forward Authorization and Proxy-Authorization headers along with Realm credentials to arbitrary redirect targets regardless of domain, scheme, or port changes. This leaks credentials on cross-domain redirects and HTTPS-to-HTTP downgrades. Additionally, even when stripAuthorizationOnRedirect is set to true, the Realm object containing plaintext credentials is still propagated to the redirect request, causing credential re-generation for Basic and Digest authentication schemes via NettyRequestFactory. An attacker who controls a redirect target (via open redirect, DNS rebinding, or MITM on HTTP) can capture Bearer tokens, Basic auth credentials, or any other Authorization header value. The fix in versions 3.0.9 and 2.14.5 automatically strips Authorization and Proxy-Authorization headers and clears Realm credentials whenever a redirect crosses origin boundaries (different scheme, host, or port) or downgrades from HTTPS to HTTP. For users unable to upgrade, set `(stripAuthorizationOnRedirect(true))` in the client config and avoid using Realm-based authentication with redirect following enabled. Note that `(stripAuthorizationOnRedirect(true))` alone is insufficient on versions prior to 3.0.9 and 2.14.5 because the Realm bypass still re-generates credentials. Alternatively, disable redirect following (`followRedirect(false)`) and handle redirects manually with origin validation.

Weakness: CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)

## Which versions are affected by CVE-2026-40490?

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.0.0 | 2.14.5 |
| `org.asynchttpclient:async-http-client` | Maven | From 2.0.0 | 2.14.5 |
| `org.asynchttpclient:async-http-client` | Maven | From 3.0.0.Beta1 | 3.0.9 |
| `org.asynchttpclient:async-http-client` | Maven | From 3.0.0.Beta1 | 3.0.9 |

## How do I fix CVE-2026-40490?

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

## Is CVE-2026-40490 being exploited?

There is no known exploitation of CVE-2026-40490 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-40490 and fix it if it is affected.

What it is: CVE-2026-40490 is a medium-severity vulnerability in AsyncHttpClient async-http-client, published on 18 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-40490 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.asynchttpclient:async-http-client (Maven): affected from 2.0.0; fixed in 2.14.5
- org.asynchttpclient:async-http-client (Maven): affected from 2.0.0; fixed in 2.14.5
- org.asynchttpclient:async-http-client (Maven): affected from 3.0.0.Beta1; fixed in 3.0.9
- org.asynchttpclient:async-http-client (Maven): affected from 3.0.0.Beta1; fixed in 3.0.9

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-2026-40490/ (Markdown: https://insights.sbomify.com/CVE-2026-40490/index.md)
```

## Sources

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

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