Improper Validation of Certificate with Host Mismatch Affecting org.springframework.boot:spring-boot-elasticsearch package, versions [,4.0.6)


Severity

Recommended
0.0
low
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.14% (4th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JAVA-ORGSPRINGFRAMEWORKBOOT-16198793
  • published24 Apr 2026
  • disclosed23 Apr 2026
  • creditYu Bao

Introduced: 23 Apr 2026

CVE-2026-40970  (opens in a new tab)
CWE-297  (opens in a new tab)

How to fix?

Upgrade org.springframework.boot:spring-boot-elasticsearch to version 4.0.6 or higher.

Overview

Affected versions of this package are vulnerable to Improper Validation of Certificate with Host Mismatch during the TLS handshake. When Spring Boot is configured to connect to Elasticsearch using an SSL bundle, the auto-configuration fails to verify that the hostname in the server's SSL certificate matched the actual hostname being connected to. While the certificate's signature and expiration might be validated, failing to check the hostname means an attacker could present any certificate signed by a trusted Certificate Authority (even one registered to an entirely different domain) and successfully intercept the traffic. This exposes the application to Man-in-the-Middle (MitM) attacks.

CVSS Base Scores

version 4.0
version 3.1