CVE-2026-82854
massSMTP command injection via unsanitized envelope size in Nodemailer
Nodemailer before 8.0.4 fails to sanitize the envelope.size parameter, which is concatenated directly into the SMTP MAIL FROM command (as the SIZE=... argument) when a message is sent. If an application passes sendMail() a custom envelope object whose size property contains attacker-controlled CRLF characters, the injected bytes break out of the MAIL FROM line and allow arbitrary SMTP commands to be injected, such as RCPT TO. This lets an attacker silently add attacker-controlled recipients to emails sent by the application, meaning the attacker can receive copies of the message content or otherwise manipulate the SMTP session. Only applications that expose the envelope size to attacker-controlled input are exploitable, because Nodemailer's default auto-constructed envelope never includes a size property. There is no public proof-of-concept, the flaw is not in the CISA KEV, and EPSS estimates roughly a 1.1% chance of exploitation within 30 days, so no confirmed in-the-wild exploitation is currently known.
What to do: Upgrade Nodemailer to 8.0.4 or later. Until patched, audit any code that passes a custom envelope object to sendMail() and strip or reject CRLF characters in a user-supplied size value, or omit the size property entirely. Defenders should also check mail server logs for unexpected extra RCPT TO recipients on messages sent via Nodemailer.
| Nodemailer (npm package) | before 8.0.4 (< 8.0.4) |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
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.
- Weakness
- CWE-93
- 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
In the news0 stories
No ingested article mentions this CVE yet.