CVE-2026-40542: Apache HttpClient 5.6 Vulnerability in SCRAM-SHA-256 Authentication

Summary

22/04/2026
Yes i
High
7.3

CVE-2026-40542: 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. Affects org.apache.httpcomponents.client5:httpclient5 versions >= 5.6-alpha1, < 5.6.1. Fixed in 5.6.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Apache HttpClient is a widely used library in Java for making HTTP requests. It provides a robust and flexible framework for handling HTTP connections, supporting various authentication methods, including SCRAM-SHA-256. However, a critical vulnerability has been identified in version 5.6, which compromises the mutual authentication process, potentially allowing unauthorized access.

Vulnerability Detail

The vulnerability arises from a missing critical step in the authentication process within Apache HttpClient 5.6. This flaw allows an attacker to exploit the SCRAM-SHA-256 authentication mechanism, leading the client to accept authentication without proper mutual verification. As a result, this could enable unauthorized users to gain access to sensitive data or perform actions on behalf of legitimate users, posing significant security risks.

How To Fix

Latest published version: 5.7-beta1 as of 23 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

5.6.1

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

Currently, there are no specific workarounds mentioned for this vulnerability. The best course of action is to upgrade to the patched version as soon as possible.

Conclusion

In summary, CVE-2026-40542 is a significant vulnerability in Apache HttpClient 5.6 that affects the SCRAM-SHA-256 authentication process. Users are urged to upgrade to version 5.6.1 to mitigate the risks associated with this vulnerability.

See every vulnerability recorded for org.apache.httpcomponents.client5:httpclient5 →

Share this vulnerability

FAQ

CVE-2026-40542 is a vulnerability in Apache HttpClient 5.6 that allows improper mutual authentication verification in SCRAM-SHA-256 authentication.

You can use Vulert, which monitors open-source vulnerabilities in your software. By simply checking your pom.xml file, you can determine if your application is affected.

The risks include unauthorized access to sensitive data and the potential for attackers to perform actions on behalf of legitimate users.

Yes, a patch is available in version 5.6.1 of Apache HttpClient. Users are strongly advised to upgrade to this version.

The CVSS score for this vulnerability is 7.3, indicating a high level of severity.

Related vulnerabilities

Recent vulnerabilities recorded for org.apache.httpcomponents.client5:httpclient5.

How To Fix

Latest published version: 5.7-beta1 as of 23 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

5.6.1

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback