CVE-2026-82854

Nodemailer before 8.0.4 SMTP Command Injection via envelope.size

Published Aug 31, 2026 CVSS 4.0 · 9.3 Critical EPSS 2.0% KEV · Not listed
Description
Nodemailer before 8.0.4 is vulnerable to SMTP command injection through the unsanitized envelope.size parameter. When an application passes a custom envelope object with a size property containing CRLF characters to sendMail(), the value is concatenated into the SMTP MAIL FROM command (as SIZE=...) without sanitization, allowing injection of arbitrary SMTP commands such as RCPT TO to silently add attacker-controlled recipients. Exploitation requires the application to expose the envelope size to attacker-controlled input, as Nodemailer does not include size in the default auto-constructed envelope.

Analysis

AI-generated

Technical impact

This vulnerability allows arbitrary SMTP commands to be injected through an unsanitized envelope.size field supplied to sendMail(). By embedding CRLF characters, an attacker can inject commands such as RCPT TO, silently adding recipients and potentially delivering unused email traffic or facilitating spam. The flaw is a classic example of command injection (CWE-93) and can lead to unauthorized mail delivery, data leakage, and system abuse.

Affected Systems

The flaw exists in the Nodemailer library prior to version 8.0.4. Any application that uses Nodemailer and accepts externally controllable envelope.size values is impacted. The default configuration in older releases does not include a size value, so the risk is contingent on the application explicitly providing this parameter.

Risk and Exploitability

The vulnerability carries a CVSS score of 9.3, indicating critical severity. The EPSS score is 1%, and the issue is not listed in the CISA KEV catalog. Exploitation requires the attacker to control or influence the envelope.size value; once injected, arbitrary SMTP commands are executed during the mail transaction, facilitating silent message delivery or other attacks. The likely attack vector is through application input that is reflected in the SMTP conversation, making it a network-based exploit.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Nodemailer to version 8.0.4 or later, which sanitizes the envelope.size field.
  • If an upgrade cannot be performed immediately, validate or sanitize any user-supplied envelope.size value to remove CRLF characters before passing it to sendMail().
  • Restrict applications from allowing unauthenticated users to specify the envelope.size parameter or remove the parameter entirely if it is not required.

Generated by OpenCVE AI on August 31, 2026 at 14:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Title Nodemailer before 8.0.3 SMTP Command Injection via envelope.size Nodemailer before 8.0.4 SMTP Command Injection via envelope.size
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Nodemailer before 8.0.4 is vulnerable to SMTP command injection through the unsanitized envelope.size parameter. When an application passes a custom envelope object with a size property containing CRLF characters to sendMail(), the value is concatenated into the SMTP MAIL FROM command (as SIZE=...) without sanitization, allowing injection of arbitrary SMTP commands such as RCPT TO to silently add attacker-controlled recipients. Exploitation requires the application to expose the envelope size to attacker-controlled input, as Nodemailer does not include size in the default auto-constructed envelope.
Title Nodemailer before 8.0.3 SMTP Command Injection via envelope.size
First Time appeared Nodemailer
Nodemailer nodemailer
Weaknesses CWE-93
CPEs cpe:2.3:a:nodemailer:nodemailer:*:*:*:*:*:*:*:*
Vendors & Products Nodemailer
Nodemailer nodemailer
References
Metrics cvssV3_1

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

cvssV4_0

{'score': 9.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-93

    Improper Neutralization of CRLF Sequences ('CRLF Injection')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Oct 29, 2026, 9:16 PM
Reserved
Aug 31, 2026, 8:37 AM
Status
Awaiting Analysis
Published
Aug 31, 2026, 9:17 AM
Modified
Oct 29, 2026, 9:17 PM