# CVE-2026-40542: Apache HttpClient accepts SCRAM-SHA-256 authentication without proper mutual authentication verification

> Attackers can bypass SCRAM-SHA-256 mutual authentication in Apache HttpClient, allowing clients to accept unverified server identities.

- **Severity:** High 7.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 22 Apr 2026
- **Updated:** 9 Sep 2026
- **Also known as:** ECHO-f0ba-e710-dc08, GHSA-v468-qcjx-r72w, MINI-4x4q-qm9w-jwm2, MINI-ggj3-5mjr-gg92, MINI-pj3f-g56v-g8fq, MINI-vxx8-m29v-f376, ROOT-APP-MAVEN-CVE-2026-40542, UBUNTU-CVE-2026-40542

## What is CVE-2026-40542?

CVE-2026-40542 is a high-severity authentication bypass vulnerability in Apache HttpClient, published on 22 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Missing critical step in authentication in Apache HttpClient 5.6 allows an attacker to cause the client to accept SCRAM-SHA-256 authentication without proper mutual authentication verification. Users are recommended to upgrade to version 5.6.1, which fixes this issue.

Weakness: CWE-325 (Missing Cryptographic Step), CWE-304 (Missing Critical Step in Authentication)

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

2 open source packages ship an affected version, including org.apache.httpcomponents.client5:httpclient5. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.httpcomponents.client5:httpclient5` | Maven | From 5.6-alpha1 | 5.6.1 |
| `org.apache.httpcomponents.client5:httpclient5` | Maven | From 5.6-alpha1 | 5.6.1 |

Products: Apache Httpclient.

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

Upgrade org.apache.httpcomponents.client5:httpclient5 to 5.6.1 or later.

## Is CVE-2026-40542 being exploited?

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

## Other vulnerabilities in Apache HttpClient

- [CVE-2013-4366](https://insights.sbomify.com/CVE-2013-4366/): Hostname verification in Apache HttpClient 4.3 was disabled by default (critical 9.8)
- [CVE-2026-71290](https://insights.sbomify.com/CVE-2026-71290/): Apache HttpComponents Client: TLS hostname verification silently disabled on the async transport (default config, MITM) (critical 9.1)
- [CVE-2025-27820](https://insights.sbomify.com/CVE-2025-27820/): Apache HttpComponents: PSL (Public Suffix List) validation bypass (high 7.5)
- [CVE-2012-5783](https://insights.sbomify.com/CVE-2012-5783/): Improper Certificate Validation in Apache Commons HttpClient (medium 5.8)
- [CVE-2026-64607](https://insights.sbomify.com/CVE-2026-64607/): Apache HttpComponents Client: Connection Leak on Content-Encoding Decode Error Leads to Pool Exhaustion DoS (medium 5.3)

## Fix prompt for AI coding agents

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

What it is: CVE-2026-40542 is a high-severity authentication bypass vulnerability in Apache HttpClient, published on 22 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-40542 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.apache.httpcomponents.client5:httpclient5 (Maven): affected from 5.6-alpha1; fixed in 5.6.1
- org.apache.httpcomponents.client5:httpclient5 (Maven): affected from 5.6-alpha1; fixed in 5.6.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-2026-40542/ (Markdown: https://insights.sbomify.com/CVE-2026-40542/index.md)
```

## Sources

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

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