CVE-2026-40992: Spring Framework Spring Boot's Mail Auto-Configuration Does Vulnerability
MODERATECVE-2026-40992 is a MODERATE (CVSS 5.0) spring boot's mail auto-configuration does vulnerability (CWE-295: Improper Certificate Validation) affecting Spring Framework libraries in the Maven ecosystem. The issue involves spring boot's mail auto-configuration does not enable ssl hostname verification. Remediation is available by upgrading affected packages to version 4.0.7, 3.5.15.
CVE-2026-40992 at a Glance
Security Impact
CVSS: 5.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L).
How to Fix CVE-2026-40992
To remediate this vulnerability, upgrade all affected Spring Framework dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
<version>4.0.7</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
<version>3.5.15</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
<version>Latest secure release</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.springframework.boot
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2026-40992, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.springframework.boot
Analyze the terminal output to locate any version of Spring Framework in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.0.7), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.springframework.boot command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-295: Improper Certificate Validation, where the product does not validate, or incorrectly validates, a certificate. In Spring Framework, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-40992 Affected Spring Framework Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.springframework.boot:spring-boot-starter-mail
|
Maven |
≥ 4.0.0
< 4.0.7
|
4.0.7
|
|
org.springframework.boot:spring-boot-starter-mail
|
Maven |
≥ 3.5.0
< 3.5.15
|
3.5.15
|
|
org.springframework.boot:spring-boot-starter-mail
|
Maven |
≥ 3.4.0
≤ 3.4.16
|
|
References
Frequently Asked Questions
What is CVE-2026-40992?
Which Spring Framework versions are affected?
What version fixes CVE-2026-40992?
Is spring-boot-starter-mail affected?
What is the CVSS score of CVE-2026-40992?
What CWE is associated with CVE-2026-40992?
How can I check Maven dependencies for CVE-2026-40992?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9wxp-w4px-32vh",
"modified" : "2026-08-18T20:13:38Z",
"published" : "2026-06-11T09:31:55Z",
"aliases" : [ "CVE-2026-40992" ],
"summary" : "Spring Boot's Mail Auto-Configuration Does Not Enable SSL Hostname Verification",
"details" : "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.\n\nAffected versions:\nSpring Boot 4.0.0 through 4.0.6; 3.5.0 through 3.5.14; 3.4.0 through 3.4.16.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.springframework.boot:spring-boot-starter-mail"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.0.7"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 4.0.6"
}
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.springframework.boot:spring-boot-starter-mail"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.5.0"
}, {
"fixed" : "3.5.15"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.5.14"
}
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.springframework.boot:spring-boot-starter-mail"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.4.0"
}, {
"last_affected" : "3.4.16"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-40992"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/spring-projects/spring-boot"
}, {
"type" : "WEB",
"url" : "https://spring.io/security/cve-2026-40992"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-295" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-08-18T20:13:38Z",
"nvd_published_at" : "2026-06-11T07:16:27Z"
}
}