CVE-2026-40992

Mail Auto-Configuration Does Not Enable SSL Hostname Verification

Published Jun 11, 2026 CVSS 3.1 · 5 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

Spring Boot’s mail auto‑configuration fails to enable SSL hostname verification when the application relies on defaults. As a result, a malicious SMTP server can present a forged certificate and the client will accept it, allowing the attacker to intercept or modify email traffic and potentially harvest credentials or other sensitive data. The weakness is a lack of an integrity check for the server identity, which can lead to data confidentiality and authentication failures.

Affected Systems

Spring Boot versions 4.0.0 through 4.0.6, 3.5.0 through 3.5.14, and 3.4.0 through 3.4.16 are affected. Upstream five minors before 4.0.7, 3.5.15, and 3.4.17 contain the fix and should be used if possible.

Risk and Exploitability

The CVSS score of 5 indicates moderate severity. The EPSS score is unavailable, and the vulnerability is not listed in CISA’s KEV catalog. The likely attack vector is a remote attacker who can control or spoof the SMTP server the application connects to; the effort to exploit is low as no privileged access or code execution is required. Proper mitigation removes the ability for an attacker to perform a man‑in‑the‑middle attack against the client’s email transport.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Spring Boot to the latest release that enables hostname verification (e.g., 4.0.7 or newer, 3.5.15 or newer, 3.4.17 or newer).
  • If an upgrade is infeasible, explicitly configure JavaMail by setting spring.mail.properties.mail.smtp.ssl.checkserveridentity=true to enable hostname verification in legacy releases.
  • Verify that all SMTP connections use TLS and that hostname verification is active before deployment.

Generated by OpenCVE AI on June 11, 2026 at 07:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-9wxp-w4px-32vh Spring Boot's Mail Auto-Configuration Does Not Enable SSL Hostname Verification
References
History
Type Values Removed Values Added
First Time appeared Vmware
Vmware spring Boot
CPEs cpe:2.3:a:vmware:spring_boot:*:*:*:*:*:*:*:*
Vendors & Products Vmware
Vmware spring Boot
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Spring
Spring spring Boot
Vendors & Products Spring
Spring spring Boot
Type Values Removed Values Added
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.
Title Mail Auto-Configuration Does Not Enable SSL Hostname Verification
Weaknesses CWE-295
References
Metrics cvssV3_1

{'score': 5, 'vector': 'CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L'}

Weaknesses
  • CWE-295

    Improper Certificate Validation

Sources

Status
PUBLISHED
Assigner
vmware
Published
Updated
Jun 23, 2026, 7:46 PM
Reserved
Apr 16, 2026, 2:19 AM
Status
Analyzed
Published
Jun 11, 2026, 7:16 AM
Modified
Sep 4, 2026, 6:05 PM