Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. nodemailer
  4. ›
  5. GHSA-c7w3-x93f-qmm8

GHSA-c7w3-x93f-qmm8: Nodemailer has SMTP command injection due to unsanitized `envelope.size` parameter

March 26, 2026

When a custom envelope object is passed to sendMail() with a size property containing CRLF characters (\r\n), the value is concatenated directly into the SMTP MAIL FROM command without sanitization. This allows injection of arbitrary SMTP commands, including RCPT TO — silently adding attacker-controlled recipients to outgoing emails.

References

  • github.com/advisories/GHSA-c7w3-x93f-qmm8
  • github.com/nodemailer/nodemailer
  • github.com/nodemailer/nodemailer/commit/2d7b9710e63555a1eb13d721296c51186d4b5651
  • github.com/nodemailer/nodemailer/security/advisories/GHSA-c7w3-x93f-qmm8

Code Behaviors & Features

Detect and mitigate GHSA-c7w3-x93f-qmm8 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 8.0.4

Fixed versions

  • 8.0.4

Solution

Upgrade to version 8.0.4 or above.

Impact 4.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')

Source file

npm/nodemailer/GHSA-c7w3-x93f-qmm8.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 12:20:23 +0000.