Nodemailer before 8.0.4 is vulnerable to SMTP command injection through the unsanitized envelope.size parameter. (CVE-2026-82854)
Description
Nodemailer versions before 8.0.4 contain a critical vulnerability allowing SMTP command injection via the unsanitized envelope.size parameter. This occurs when an application passes a custom envelope object with a size property containing CRLF characters to the sendMail() function, enabling injection of arbitrary SMTP commands such as RCPT TO. Exploitation requires attacker control over the envelope size input, which is not included by default in Nodemailer's auto-constructed envelope.
CVSS v3.1
Score 9.8critical
Affected software
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Nodemailer before version 8.0.4 is vulnerable to SMTP command injection due to improper sanitization of the envelope.size parameter. When a custom envelope object with a size property containing carriage return and line feed (CRLF) characters is passed to the sendMail() API, the value is concatenated directly into the SMTP MAIL FROM command as SIZE= without sanitization. This allows an attacker to inject arbitrary SMTP commands, such as RCPT TO, potentially adding attacker-controlled recipients silently. The vulnerability requires that the application exposes the envelope size to attacker-controlled input, as the default Nodemailer envelope does not include the size property.
Potential Impact
Successful exploitation can lead to injection of arbitrary SMTP commands, compromising the integrity of email sending operations. This can allow attackers to add unauthorized recipients to emails, potentially leading to information disclosure or abuse of the mail server. The CVSS score of 9.8 indicates critical impact with high confidentiality, integrity, and availability consequences.
Mitigation Recommendations
A fix is available in Nodemailer version 8.0.4 and later. Users should upgrade to version 8.0.4 or newer to remediate this vulnerability. Until upgraded, ensure that applications do not pass attacker-controlled input to the envelope.size parameter or sanitize this input to prevent injection of CRLF characters.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-2x76-7hhq-pgvw
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-82854"]
- Database Specific Severity
- CRITICAL
- Cvss Version
- 3.1
Threat ID: 6a95a0f1acd9273b4947e23b
Added to database: 08/31/2026, 15:42:41 UTC
Last enriched: 09/08/2026, 00:07:31 UTC
Last updated: 10/14/2026, 06:48:21 UTC
Views: 50
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.