Improper Validation of Certificate with Host Mismatch Affecting org.springframework.boot:spring-boot-mail package, versions [3.4.0,3.5.15)[4.0.0-M1,4.0.7)


Severity

Recommended
0.0
low
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.12% (3rd 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-18322496
  • published27 Jul 2026
  • disclosed10 Jun 2026
  • creditUnknown

Introduced: 10 Jun 2026

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

How to fix?

Upgrade org.springframework.boot:spring-boot-mail to version 3.5.15, 4.0.7 or higher.

Overview

org.springframework.boot:spring-boot-mail is a

Affected versions of this package are vulnerable to Improper Validation of Certificate with Host Mismatch. via missing hostname verification in the auto-configuration. An attacker can impersonate a trusted mail server and intercept or manipulate SMTP communications because hostname verification is not enabled by default when establishing TLS-protected mail connections.

Note: Applications that explicitly enable hostname verification, for example by setting spring.mail.properties.mail.smtp.ssl.checkserveridentity=true, are not affected.

CVSS Base Scores

version 4.0
version 3.1