Skip to main content

Jakarta Mail CVE-2025-7962

MEDIUM
Improper Neutralization of Input Terminators (CWE-147)
2025-07-21 emo@eclipse.org
6.0
CVSS 4.0 · Vendor: eclipse
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Authenticate to target application
  2. Delivery
    Craft input with \r\n UTF-8 sequences
  3. Exploit
    Submit input in email-related field
  4. Install
    Application passes unsanitized input to Jakarta Mail
  5. C2
    Jakarta Mail forwards raw CRLF to SMTP stream
  6. Execute
    Mail server executes injected SMTP command
  7. Impact
    Forge email headers or relay unauthorized message

Vulnerability Assessment

Weakness
CWE
Exploitation Conditions

Exploitation requires two concurrent conditions: the target application must use Jakarta Mail (or Angus Mail) in a version prior to 2.0.2, AND at least one user-controlled string (such as a display name, subject line, reply-to address, or custom header value) must be passed without prior sanitization to a Jakarta Mail API that constructs outbound SMTP traffic. The CVSS PR:L rating indicates that a low-privilege authenticated position within the application is sufficient - unauthenticated exploitation is not confirmed from available data. The AC:H rating reflects that the attacker must identify an input path that routes through the Jakarta Mail SMTP construction layer without intermediate sanitization. Exploitation is limited to integrity impacts (SMTP command injection, message forging, header manipulation); there is no confirmed path to confidentiality disclosure or denial of service. Applications that sanitize email fields at the application layer before invoking Jakarta Mail are not exploitable regardless of library version.

Impact

The CVSS 4.0 score of 6.0 (Medium) reflects the real-world constraints: network access is required (AV:N), but complexity is rated High (AC:H), meaning exploitation is not trivial and depends on specific input routing through the library. Privileges are rated Low (PR:L), indicating that an attacker typically needs some authenticated foothold in the application that invokes Jakarta Mail. The integrity impact is High on the vulnerable system (VI:H) - meaning message content and SMTP command flow can be substantially corrupted - while the subsequent system impact is rated Low (SI:L), capturing limited downstream effects on mail server state. There is no confidentiality or availability impact, narrowing the blast radius to integrity-focused attacks such as email spoofing, header injection, or unauthorized message relay. EPSS data is not available in the provided intelligence, and the CVE is absent from CISA KEV, indicating no confirmed active exploitation at time of analysis. Overall, this is a legitimate integrity risk in Java applications that pass untrusted user input to Jakarta Mail without pre-sanitizing email fields - it is not a panic-priority critical but warrants prompt patching given the deterministic nature of the injection class.

Exploit ScenarioDerived

An attacker with a low-privilege account in a web application (e.g., a user who can submit a support ticket or update their display name) provides a crafted string containing \r\n UTF-8 sequences in a field that the application passes directly to Jakarta Mail as an email header or body parameter. Jakarta Mail forwards the unsanitized content to the SMTP server as part of the message transaction. The injected newlines terminate the current SMTP command and introduce a new command - for example, injecting a second RCPT TO directive to send a copy of a message to an unintended recipient, or injecting a DATA segment to relay a forged message through the trusted mail server. No public proof-of-concept code has been identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.8% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 23, 2026

SMTP injection in Eclipse Jakarta Mail (and its Angus Mail implementation) prior to version 2.0.2 allows a low-privileged attacker to inject arbitrary SMTP protocol commands by embedding raw carriage return (\r) and line feed (\n) UTF-8 characters into email fields processed by the library. The library fails to sanitize these input terminators before passing data to the SMTP command stream, enabling an attacker with control over email content to inject additional SMTP commands, forge headers, or deliver unsolicited messages through a trusted mail relay. No public exploit code has been identified at time of analysis, and this CVE is not listed in the CISA KEV catalog.

RemediationAI

Upgrade to Jakarta Mail version 2.0.2 or later, which is the vendor-confirmed fixed release per the CVE description. For Angus Mail, verify the corresponding fixed release against the Eclipse GitLab advisory at https://gitlab.eclipse.org/security/cve-assignement/-/issues/67 and the oss-security disclosure at http://www.openwall.com/lists/oss-security/2025/09/03/4. If an immediate upgrade is not feasible, implement input sanitization at the application layer before passing user-controlled strings to Jakarta Mail APIs: strip or reject any occurrence of \r (CR, 0x0D) and \n (LF, 0x0A) characters - including their UTF-8 encoded equivalents - from all email header values and controlled body segments. This compensating control adds application-layer coupling to mail handling logic and may need updating if additional bypass encodings are discovered. Dependency scanning tools (e.g., OWASP Dependency-Check, Snyk, Trivy) should be used to identify transitive inclusions of the affected library across all Java projects.

Affected Packages

maven com.sun.mail:jakarta.mail fix: 1.6.8, 2.0.2
maven org.eclipse.angus:smtp fix: 2.0.4

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in maven

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Jakarta Mail (CPE: cpe:2.3:a:eclipse:jakarta_mail) is the Eclipse Foundation's implementation of the Jakarta Mail specification (formerly JavaMail), the standard Java API for email composition and transport. Angus Mail (CPE: cpe:2.3:a:eclipse:angus_mail) is a separate Eclipse project that serves as the standalone reference implementation of this API and is also affected. CWE-147 (Improper Neutralization of Input Terminators) describes the root cause: SMTP is a line-oriented protocol where \r\n (CRLF) sequences delimit commands. When user-controlled data containing these sequences is interpolated into SMTP headers or message content without stripping or encoding, an attacker can prematurely terminate a current SMTP command and inject a new arbitrary SMTP command on a fresh line. The vulnerability is specific to UTF-8 representations of these characters, suggesting the sanitization logic may have handled ASCII CRLF while missing equivalent UTF-8 encoded forms, a classic bypassed-filter variant of header injection.

Know when Jakarta Mail gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (eclipse) PRIMARY 6.0 MEDIUM
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
vuln.today AI 6.3 MEDIUM

Network vector with high complexity; low privilege reflects authenticated app-user requirement; scope changed because injected commands affect the downstream SMTP mail server.

3.1 AV:N/AC:H/PR:L/UI:N/S:C/C:N/I:H/A:N
4.0 AV:N/AC:H/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:L/SA:N
SUSE 5.9 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
Red Hat 5.3 MEDIUM

Primary rating from Vendor (eclipse).

CVSS VectorVendor: eclipse

Attack Vector
Network
Attack Complexity
High
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
Low
Subsequent system: Availability
None

DescriptionCVE.org

In Jakarta Mail versions prior to 2.0.2 it is possible to perform an SMTP Injection by utilizing the \r and \n UTF-8 characters to separate different messages.

Threat Intelligence Overview

EPSS Score
0.8%
Top 50% exploitable
Prevalence
Medium
standard Java email API, common in enterprise Java apps
Data Quality
2 sources
Confidence: Low

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.8%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

31
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Affected Products (CPE)CVE.org

cpe:2.3:a:eclipse:jakarta_mail:*:*:*:*:*:*:*:*
cpe:2.3:a:eclipse:jakarta_mail:*:*:*:*:*:*:*:*
cpe:2.3:a:eclipse:angus_mail:*:*:*:*:*:*:*:*

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
Container suse/manager/5.0/x86_64/server:5.0.5.1.7.33.2 Container suse/multi-linux-manager/5.1/x86_64/server:5.1.1.8.7.1 Image SLES15-SP4-Manager-Server-4-3-BYOS Image SLES15-SP4-Manager-Server-4-3-BYOS-Azure Image SLES15-SP4-Manager-Server-4-3-BYOS-EC2 Image SLES15-SP4-Manager-Server-4-3-BYOS-GCE Image server-image Image server-image-sles15sp7 Affected
SUSE Linux Enterprise Desktop 15 SP6 SUSE Linux Enterprise High Performance Computing 15 SP6 SUSE Linux Enterprise Module for Basesystem 15 SP6 SUSE Linux Enterprise Server 15 SP6 SUSE Linux Enterprise Server for SAP Applications 15 SP6 Fixed
SUSE Linux Enterprise Desktop 15 SP7 SUSE Linux Enterprise High Performance Computing 15 SP7 SUSE Linux Enterprise Module for Basesystem 15 SP7 SUSE Linux Enterprise Server 15 SP7 SUSE Linux Enterprise Server for SAP Applications 15 SP7 Fixed
SUSE Linux Enterprise Server 16.0 Fixed
openSUSE Leap 15.6 Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy