Vulnerabilities in pkg:maven/com.sun.mail/jakarta.mail
PACKAGECVE-2025-7962 is a MODERATE (CVSS 7.5) jakarta mail vulnerable to smtp vulnerability (CWE-147: Improper Neutralization of Input Terminators) affecting Smtp libraries in the Maven ecosystem. The issue involves jakarta mail vulnerable to smtp injection. Remediation is available by upgrading affected packages to version 2.0.4, 1.6.8, 2.0.2.
pkg:maven/com.sun.mail/jakarta.mail
Vulnerability advisories affecting package pkg:maven/com.sun.mail/jakarta.mail. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-9342-92gg-6v29 | CVE-2025-7962 | MODERATE | Jakarta Mail vulnerable to SMTP Injection |
CVE-2025-7962 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).
How to Fix CVE-2025-7962
To remediate this vulnerability, upgrade all affected Smtp 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.eclipse.angus</groupId>
<artifactId>smtp</artifactId>
<version>2.0.4</version>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<version>1.6.8</version>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<version>2.0.2</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.eclipse.angus
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2025-7962, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.eclipse.angus
Analyze the terminal output to locate any version of Smtp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.4), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.eclipse.angus 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-147: Improper Neutralization of Input Terminators, where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could be interpreted as input terminators when they are sent to a downstream component. In Smtp, 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-2025-7962 Affected Smtp Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.eclipse.angus:smtp
|
Maven |
< 2.0.4
|
2.0.4
|
|
com.sun.mail:jakarta.mail
|
Maven |
< 1.6.8
|
1.6.8
|
|
com.sun.mail:jakarta.mail
|
Maven |
≥ 2.0.0
< 2.0.2
|
2.0.2
|
References
Frequently Asked Questions
What is CVE-2025-7962?
Which Smtp versions are affected?
What version fixes CVE-2025-7962?
Is smtp affected?
Is jakarta.mail affected?
What is the CVSS score of CVE-2025-7962?
What CWE is associated with CVE-2025-7962?
How can I check Maven dependencies for CVE-2025-7962?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9342-92gg-6v29",
"modified" : "2026-04-16T18:47:48Z",
"published" : "2025-07-21T18:32:19Z",
"aliases" : [ "CVE-2025-7962" ],
"summary" : "Jakarta Mail vulnerable to SMTP Injection",
"details" : "In Jakarta Mail 2.2 it is possible to preform a SMTP Injection by utilizing the \\r and \\n UTF-8 characters to separate different messages.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:L/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.eclipse.angus:smtp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.0.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "com.sun.mail:jakarta.mail"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.6.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "com.sun.mail:jakarta.mail"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.0.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-7962"
}, {
"type" : "WEB",
"url" : "https://github.com/jakartaee/mail-api/issues/765"
}, {
"type" : "WEB",
"url" : "https://github.com/jakartaee/mail-api/pull/760"
}, {
"type" : "WEB",
"url" : "https://github.com/eclipse-ee4j/angus-mail/commit/269099b652a0a5c2fa140f1296a18f0fbbea0d44"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/eclipse-ee4j/angus-mail"
}, {
"type" : "WEB",
"url" : "https://gitlab.eclipse.org/security/cve-assignement/-/issues/67"
}, {
"type" : "WEB",
"url" : "https://gitlab.eclipse.org/security/vulnerability-reports/-/issues/290"
}, {
"type" : "WEB",
"url" : "https://gitlab.eclipse.org/security/vulnerability-reports/-/issues/290#note_5320539"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2025/09/03/4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-147" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-08-06T20:44:37Z",
"nvd_published_at" : "2025-07-21T18:15:28Z"
}
}