fix(deps): update dependency nodemailer to v8 [security]#8341
Open
backstage-goalie[bot] wants to merge 1 commit intomainfrom
Open
fix(deps): update dependency nodemailer to v8 [security]#8341backstage-goalie[bot] wants to merge 1 commit intomainfrom
backstage-goalie[bot] wants to merge 1 commit intomainfrom
Conversation
Contributor
Author
Changed Packages
|
f38e648 to
7a41674
Compare
7a41674 to
dd5f07a
Compare
dd5f07a to
3e5f001
Compare
3e5f001 to
699ff5e
Compare
699ff5e to
b165b71
Compare
b165b71 to
331edc5
Compare
331edc5 to
f8254c8
Compare
f8254c8 to
63438be
Compare
63438be to
bf0923c
Compare
bf0923c to
720b1c4
Compare
720b1c4 to
202d242
Compare
202d242 to
cc280b1
Compare
cc280b1 to
9f4d755
Compare
9f4d755 to
57337af
Compare
57337af to
544d3cc
Compare
544d3cc to
2f2b11b
Compare
2f2b11b to
48ad5bc
Compare
48ad5bc to
b37b639
Compare
b37b639 to
e8173fc
Compare
e8173fc to
89c2bf0
Compare
89c2bf0 to
6c6b13e
Compare
6c6b13e to
f4e738d
Compare
f4e738d to
b5ef1a5
Compare
b5ef1a5 to
005dccd
Compare
c9a61a2 to
68670fd
Compare
68670fd to
4a9064c
Compare
4a9064c to
9364013
Compare
9364013 to
ed551e7
Compare
ed551e7 to
492c8c3
Compare
492c8c3 to
812d648
Compare
812d648 to
4e7afe5
Compare
4e7afe5 to
00f4069
Compare
00f4069 to
09df981
Compare
09df981 to
c68f83c
Compare
c68f83c to
c2c9b4e
Compare
c2c9b4e to
fac08aa
Compare
Signed-off-by: Renovate Bot <bot@renovateapp.com>
fac08aa to
1e38429
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^7.0.7→^8.0.0Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Nodemailer has SMTP command injection due to unsanitized
envelope.sizeparameterGHSA-c7w3-x93f-qmm8
More information
Details
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.Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
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
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, 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.