MODERATE 5.0

CVE-2026-40992

Spring Boot's Mail Auto-Configuration Does Not Enable SSL Hostname Verification

Description

Spring Boot's Mail auto-configuration does not enable hostname verification. Applications that set the relevant JavaMail property, such as spring.mail.properties.mail.smtp.ssl.checkserveridentity=true, are not affected.

Affected versions: Spring Boot 4.0.0 through 4.0.6; 3.5.0 through 3.5.14; 3.4.0 through 3.4.16.

Affected Maven artifacts (1)

ArtifactAffected versionsFixed in
org.springframework.boot » spring-boot-starter-mail
>= 3.4.0, <= 3.4.16>= 3.5.0, < 3.5.15>= 4.0.0, < 4.0.7
3.5.15, 4.0.7

Blast radius

1affected artifacts
36affected versions
778dependent artifacts (est.)
18,282dependent versions

34% of the dependent artifacts (266) still pull an affected version in their latest release.

DepthDependent versions
Direct
2,439
2 hops
4,134
3 hops
7,745
4 hops
3,484
5 hops
403
6 hops
77

Most used dependents

Computed from the dependency graph of build 20261125.0317 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.

References

Advisorynvd.nist.gov
Packagegithub.com
Webspring.io