Update dependency nodemailer to v8 [SECURITY]#25083
Update dependency nodemailer to v8 [SECURITY]#25083renovate[bot] wants to merge 1 commit intomainfrom
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Note Free review on us!CodeRabbit is offering free reviews until Wed Oct 08 2025 to showcase some of the refinements we've made. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #25083 +/- ##
==========================================
- Coverage 73.21% 73.19% -0.03%
==========================================
Files 1539 1540 +1
Lines 121718 121774 +56
Branches 14733 14708 -25
==========================================
+ Hits 89118 89129 +11
- Misses 31568 31615 +47
+ Partials 1032 1030 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c80eda5 to
0caa83b
Compare
|
❌ The last analysis has failed. |
This PR contains the following updates:
6.10.1→8.0.4GitHub Vulnerability Alerts
GHSA-c7w3-x93f-qmm8
Summary
When a custom
envelopeobject is passed tosendMail()with asizeproperty containing CRLF characters (\r\n), the value is concatenated directly into the SMTPMAIL FROMcommand without sanitization. This allows injection of arbitrary SMTP commands, includingRCPT TO— silently adding attacker-controlled recipients to outgoing emails.Details
In
lib/smtp-connection/index.js(lines 1161-1162), theenvelope.sizevalue is concatenated into the SMTPMAIL FROMcommand without any CRLF sanitization:This contrasts with other envelope parameters in the same function that ARE properly sanitized:
from,to): validated for[\r\n<>]at lines 1107-1127dsn.ret,dsn.envid,dsn.orcpt): encoded viaencodeXText()at lines 1167-1183The
sizeproperty reaches this code path throughMimeNode.setEnvelope()inlib/mime-node/index.js(lines 854-858), which copies all non-standard envelope properties verbatim:Since
_sendCommand()writes the command string followed by\r\nto the raw TCP socket, a CRLF in thesizevalue terminates theMAIL FROMcommand and starts a new SMTP command.Note: by default, Nodemailer constructs the envelope automatically from the message's
from/tofields and does not includesize. This vulnerability requires the application to explicitly pass a customenvelopeobject with asizeproperty tosendMail().While this limits the attack surface, applications that expose envelope configuration to users are affected.
PoC
ave the following as
poc.jsand run withnode poc.js:Expected output:
The
RCPT TO:<attacker@evil.com>line is injected by the CRLF in thesizefield, silently adding an extra recipient to the email.Impact
This is an SMTP command injection vulnerability. An attacker who can influence the
envelope.sizeproperty in asendMail()call can:RCPT TOcommands, receiving copies of all emails sent through the affected transportRSET, additionalMAIL FROMto send entirely separate emails through the server)The severity is mitigated by the fact that the
envelopeobject must be explicitly provided by the application. Nodemailer's default envelope construction from message headers does not includesize. Applications that pass through user-controlled data to the envelope options (e.g., via API parameters, admin panels, or template configurations) are vulnerable.Affected versions: at least v8.0.3 (current); likely all versions where
envelope.sizeis supported.Release Notes
nodemailer/nodemailer (nodemailer)
v8.0.4Compare Source
Bug Fixes
v8.0.3Compare Source
Bug Fixes
v8.0.2Compare Source
Bug Fixes
v8.0.1Compare Source
Bug Fixes
v8.0.0Compare Source
⚠ BREAKING CHANGES
Bug Fixes
v7.0.13Compare Source
Bug Fixes
v7.0.12Compare Source
Bug Fixes
v7.0.11Compare Source
Bug Fixes
v7.0.10Compare Source
Bug Fixes
v7.0.9Compare Source
Bug Fixes
v7.0.7Compare Source
Bug Fixes
v7.0.6Compare Source
Bug Fixes
v7.0.5Compare Source
Bug Fixes
v7.0.4Compare Source
Bug Fixes
v7.0.3Compare Source
Bug Fixes
v7.0.2Compare Source
Bug Fixes
v7.0.1Compare Source
Bug Fixes
v7.0.0Compare Source
⚠ BREAKING CHANGES
Features
Configuration
📅 Schedule: Branch creation - "" in timezone Etc/UTC, Automerge - Only on Sunday and Saturday ( * * * * 0,6 ), Between 12:00 AM and 12:59 PM, only on Monday ( * 0-12 * * 1 ) in timezone Etc/UTC.
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Never, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.