CVE-2025-7962: Smtp Jakarta Mail Vulnerable To SMTP Vulnerability

MODERATE
Advisory Identifier: GHSA-9342-92gg-6v29
CVSS 7.5
CWE-147
Published
Advisory Summary

CVE-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.

CVE-2025-7962 at a Glance

CVE Identifier CVE-2025-7962
GHSA Identifier GHSA-9342-92gg-6v29
Severity MODERATE
CVSS v3.1 Base Score 7.5
CWE Classification CWE-147: Improper Neutralization of Input Terminators
Affected Product Smtp
Package Ecosystem Maven
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (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.

org.eclipse.angus:smtp fixed: 2.0.4
<dependency>
    <groupId>org.eclipse.angus</groupId>
    <artifactId>smtp</artifactId>
    <version>2.0.4</version>
</dependency>
com.sun.mail:jakarta.mail fixed: 1.6.8
<dependency>
    <groupId>com.sun.mail</groupId>
    <artifactId>jakarta.mail</artifactId>
    <version>1.6.8</version>
</dependency>
com.sun.mail:jakarta.mail fixed: 2.0.2
<dependency>
    <groupId>com.sun.mail</groupId>
    <artifactId>jakarta.mail</artifactId>
    <version>2.0.2</version>
</dependency>
Verify Direct and Transitive Dependencies

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

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.

CVE-2025-7962 Affected Smtp Versions

3 component(s)
Fixed Versions:
2.0.41.6.82.0.2
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?
CVE-2025-7962 is a security vulnerability in Smtp involving Jakarta Mail vulnerable to SMTP Injection under CWE-147: Improper Neutralization of Input Terminators.
Which Smtp versions are affected?
Affected versions include releases prior to 2.0.4, 1.6.8, 2.0.2 across affected packages: org.eclipse.angus:smtp, com.sun.mail:jakarta.mail.
What version fixes CVE-2025-7962?
Upgrading to 2.0.4, 1.6.8, 2.0.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is smtp affected?
Yes, org.eclipse.angus:smtp is affected in releases prior to 2.0.4. Upgrade your dependency to 2.0.4 or later.
Is jakarta.mail affected?
Yes, com.sun.mail:jakarta.mail is affected in releases prior to 1.6.8, 2.0.2. Upgrade your dependency to 1.6.8, 2.0.2 or later.
What is the CVSS score of CVE-2025-7962?
CVE-2025-7962 has a CVSS v3.1 base score of 7.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2025-7962?
CVE-2025-7962 is classified under CWE-147: Improper Neutralization of Input Terminators (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.).
How can I check Maven dependencies for CVE-2025-7962?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.eclipse.angus'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}