Public mode

No access to your tenant or devices. Every item links to its source. What this means

Sources need attention Customize Public modeDiscuss ChangeIntel on Discord

Nodemailer before 8.0.5 SMTP Command Injection via CRLF

CVSS 4.0 6.9 MEDIUMCVSS 3.1 4.9 MEDIUMEUVD CVSS 4.0 6.9 CVSS 4.0 · [email protected] · Secondary 6.9 MEDIUMCVSS 3.1 · [email protected] · Secondary 4.9 MEDIUMCVSS_V3 Publisher rating MODERATEFixed by nodemailer 8.0.5KEV status unknown

cve-program · CVE-2026-82853

Published

Nodemailer versions before 8.0.5 contain an SMTP command injection vulnerability in the transport name option used in EHLO/HELO commands. The name parameter is concatenated directly into SMTP commands without sanitizing carriage return and line feed characters, allowing attackers to inject arbitrary SMTP commands for email spoofing and phishing attacks.

Read the publisher's advisory

euvd · EUVD-2026-68441

Published

Nodemailer versions before 8.0.5 contain an SMTP command injection vulnerability in the transport name option used in EHLO/HELO commands. The name parameter is concatenated directly into SMTP commands without sanitizing carriage return and line feed characters, allowing attackers to inject arbitrary SMTP commands for email spoofing and phishing attacks.

Read the publisher's advisory

nvd · CVE-2026-82853

Published

Nodemailer versions before 8.0.5 contain an SMTP command injection vulnerability in the transport name option used in EHLO/HELO commands. The name parameter is concatenated directly into SMTP commands without sanitizing carriage return and line feed characters, allowing attackers to inject arbitrary SMTP commands for email spoofing and phishing attacks.

Read the publisher's advisory

osv · GHSA-vvjj-xcjg-gr5g

Published

### Summary Nodemailer versions up to and including 8.0.4 are vulnerable to SMTP command injection via CRLF sequences in the transport `name` configuration option. The `name` value is used directly in the EHLO/HELO SMTP command without any sanitization for carriage return and line feed characters (`\r\n`). An attacker who can influence this option can inject arbitrary SMTP commands, enabling unauthorized email sending, email spoofing, and phishing attacks. ### Details The vulnerability exists in `lib/smtp-connection/index.js`. When establishing an SMTP connection, the `name` option is concatenated directly into the EHLO command: ```javascript // lib/smtp-connection/index.js, line 71 this.name = this.options.name || this._getHostname(); // line 1336 this._sendCommand('EHLO ' + this.name); ``` The `_sendCommand` method writes the string directly to the socket followed by `\r\n` (line 1082): ```javascript this._socket.write(Buffer.from(str + '\r\n', 'utf-8')); ``` If the `name` option contains `\r\n` sequences, each injected line is interpreted by the SMTP server as a separate command. Unlike the `envelope.from` and `envelope.to` fields which are validated for `\r\n` (line 1107-1119), and unlike `envelope.size` which was recently fixed (GHSA-c7w3-x93f-qmm8) by casting to a number, the `name` parameter receives no CRLF sanitization whatsoever. This is distinct from the previously reported GHSA-c7w3-x93f-qmm8 (envelope.size injection) as it affects a different parameter (`name` vs `size`), uses a different injection point (EHLO command vs MAIL FROM command), and occurs at connection initialization rather than during message sending. The `name` option is also used in HELO (line 1384) and LHLO (line 1333) commands with the same lack of sanitization. ### PoC ```javascript const nodemailer = require('nodemailer'); const net = require('net'); // Simple SMTP server to observe injected commands const server = net.createServer(socket => { socket.write('220 test ESMTP\r\n'); socket.on('data', data => { const lines = data.toString().split('\r\n').filter(l => l); lines.forEach(line => { console.log('SMTP CMD:', line); if (line.startsWith('EHLO') || line.startsWith('HELO')) socket.write('250 OK\r\n'); else if (line.startsWith('MAIL FROM')) socket.write('250 OK\r\n'); else if (line.startsWith('RCPT TO')) socket.write('250 OK\r\n'); else if (line === 'DATA') socket.write('354 Go\r\n'); else if (line === '.') socket.write('250 OK\r\n'); else if (line === 'QUIT') { socket.write('221 Bye\r\n'); socket.end(); } else if (line === 'RSET') socket.write('250 OK\r\n'); }); }); }); server.listen(0, '127.0.0.1', () => { const port = server.address().port; // Inject a complete phishing email via EHLO name const transport = nodemailer.createTransport({ host: '127.0.0.1', port: port, secure: false, name: 'legit.host\r\nMAIL FROM:<[email protected]>\r\n' + 'RCPT TO:<[email protected]>\r\nDATA\r\n' + 'From: [email protected]\r\nTo: [email protected]\r\n' + 'Subject: Urgent\r\n\r\nPhishing content\r\n.\r\nRSET' }); transport.sendMail({ from: '[email protected]', to: '[email protected]', subject: 'Normal email', text: 'Normal content' }, () => { server.close(); process.exit(0); }); }); ``` Running this PoC shows the SMTP server receives the injected MAIL FROM, RCPT TO, DATA, and phishing email content as separate SMTP commands before the legitimate email is sent. ### Impact **Who is affected:** Applications that allow users or external input to configure the `name` SMTP transport option. This includes: - Multi-tenant SaaS platforms with per-tenant SMTP configuration - Admin panels where SMTP hostname/name settings are stored in databases - Applications loading SMTP config from environment variables or external sources **What can an attacker do:** 1. **Send unauthorized emails** to arbitrary recipients by injecting MAIL FROM and RCPT TO commands 2. **Spoof email senders** by injecting arbitrary From headers in the DATA portion 3. **Conduct phishing attacks** using the legitimate SMTP server as a relay 4. **Bypass application-level controls** on email recipients, since the injected commands are processed before the application's intended MAIL FROM/RCPT TO 5. **Perform SMTP reconnaissance** by injecting commands like VRFY or EXPN The injection occurs at the EHLO stage (before authentication in most SMTP flows), making it particularly dangerous as the injected commands may be processed with the server's trust context. **Recommended fix:** Sanitize the `name` option by stripping or rejecting CRLF sequences, similar to how `envelope.from` and `envelope.to` are already validated on lines 1107-1119 of `lib/smtp-connection/index.js`. For example: ```javascript this.name = (this.options.name || this._getHostname()).replace(/[\r\n]/g, ''); ```

Read the publisher's advisory

Affected versions, risk and source history

cve-program · CVE-2026-82853

Published

nodemailer

Vendor product

Publisher's version information

Shown as published. These rules are not interpreted as NuGet package version ranges.

{
                    "vendor": "nodemailer",
                    "product": "nodemailer",
                    "defaultStatus": "unaffected",
                    "packageURL": "pkg:npm/nodemailer",
                    "versions": [
                        {
                            "version": "0",
                            "status": "affected",
                            "versionType": "semver",
                            "lessThan": "8.0.5"
                        },
                        {
                            "version": "8.0.5",
                            "status": "unaffected",
                            "versionType": "semver"
                        }
                    ]
                }

Original source record · Cite this exact observation · Complete original publisher JSON

euvd · EUVD-2026-68441

Published

EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.

Original publisher date fields

datePublished: Aug 31, 2026, 8:46:27 AM

dateUpdated: Aug 31, 2026, 11:00:28 AM

No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.

Original source record · Cite this exact observation · Complete original publisher JSON

nvd · CVE-2026-82853

Published

NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.

Source analysis status: Awaiting Analysis

Weakness classifications: CWE-93

Original publisher date fields

published: 2026-08-31T09:17:05.320

lastModified: 2026-09-10T15:48:28.757

No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.

Original source record · Cite this exact observation · Complete original publisher JSON

osv · GHSA-vvjj-xcjg-gr5g

Published

nodemailer

npm

SEMVER · introduced 0 → fixed 8.0.5

Original source record · Cite this exact observation · Complete original publisher JSON

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 15 Nov 02:45 UTC · 256 of 275 readable · 254 fully read · documentation 439/469 current