Intel

AIKIDO-2026-70372

spring-boot-autoconfigure is vulnerable to Improper Validation of Certificate with Host Mismatch

CVE-2026-40992Published Jun 15, 2026
June 15, 2026

50

CVE Score

Medium

Improper Validation of Certificate with Host Mismatch

Are you affected? Scan for Free

TL;DR

Spring Boot's mail auto-configuration does not enable SSL hostname verification by default for JavaMail connections. As a result, applications may fail to verify that the mail server's certificate matches the expected hostname, potentially allowing man-in-the-middle attacks when connecting to malicious or impersonated mail servers.

How do I fix this?

Upgrade the org.springframework.boot:spring-boot-autoconfigure library to a patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range. Applications that explicitly enable hostname verification through JavaMail properties are not affected.

Versions

3.4.0 - 3.5.14

Fixed in 3.5.15

4.0.0 - 4.0.6

Fixed in 4.0.7

Background info

spring-boot-autoconfigure is vulnerable to Improper Validation of Certificate with Host Mismatch in versions 3.4.0 - 3.5.14 and 4.0.0 - 4.0.6.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea