Update npm package nodemailer to v8.0.5 [SECURITY]#8614
Update npm package nodemailer to v8.0.5 [SECURITY]#8614hash-worker[bot] merged 1 commit intomainfrom
nodemailer to v8.0.5 [SECURITY]#8614Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
PR SummaryLow Risk Overview Reviewed by Cursor Bugbot for commit b1cad7e. Bugbot is set up for automated code reviews on this repo. Configure here. |
🤖 Augment PR SummarySummary: Updates Changes: Bumps the pinned dependency version (and corresponding lockfile) to pull in the upstream sanitization fix and related SMTP response decoding bugfixes. 🤖 Was this summary useful? React with 👍 or 👎 |
This PR contains the following updates:
8.0.4->8.0.5Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
GitHub Vulnerability Alerts
GHSA-vvjj-xcjg-gr5g
Summary
Nodemailer versions up to and including 8.0.4 are vulnerable to SMTP command injection via CRLF sequences in the transport
nameconfiguration option. Thenamevalue 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, thenameoption is concatenated directly into the EHLO command:The
_sendCommandmethod writes the string directly to the socket followed by\r\n(line 1082):If the
nameoption contains\r\nsequences, each injected line is interpreted by the SMTP server as a separate command. Unlike theenvelope.fromandenvelope.tofields which are validated for\r\n(line 1107-1119), and unlikeenvelope.sizewhich was recently fixed (GHSA-c7w3-x93f-qmm8) by casting to a number, thenameparameter 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 (
namevssize), uses a different injection point (EHLO command vs MAIL FROM command), and occurs at connection initialization rather than during message sending.The
nameoption is also used in HELO (line 1384) and LHLO (line 1333) commands with the same lack of sanitization.PoC
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
nameSMTP transport option. This includes:What can an attacker do:
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
nameoption by stripping or rejecting CRLF sequences, similar to howenvelope.fromandenvelope.toare already validated on lines 1107-1119 oflib/smtp-connection/index.js. For example:Release Notes
nodemailer/nodemailer (nodemailer)
v8.0.5Compare Source
Bug Fixes
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - "before 4am every weekday,every weekend" (UTC).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.