nodemailer
10.6.0 · 15 Nov 2026MIT-040.3M / weekRepositoryHomepagenpmAtom feed
Upgrading nodemailer From 6.10.1 to 10.6.0
67 releases in betweenevery note read
Before you upgrade
Tick each one off as you go- Breaking10.2.1
- Breaking10.0.0
- Breaking9.0.0
- Breaking8.0.0
- Breaking7.0.0
Security
Fixes 22 advisories affecting 6.10.1
- Nodemailer: CRLF injection in Nodemailer List-* header comments allows arbitrary message header injectionmoderate · GHSA-268h-hp4c-crq3
- Nodemailer: Quadratic (O(n²)) time complexity in addressparser allows remote denial of service via a crafted address listhigh · GHSA-2x7j-588g-ccc2
- Nodemailer: Quadratic (O(n^2)) DKIM header unfolding lets a large folded header cause remote denial of service during signingmoderate · GHSA-39m8-27wv-hr27
- Nodemailer: Quadratic backtracking in SMTP AUTH mechanism detection regexes allows pre-auth remote denial of servicemoderate · GHSA-4ffr-jq9g-5ffx
- Nodemailer: Quadratic (O(n^2)) SMTP client reply parsing lets a malicious server or MITM cause a pre-auth remote denial of servicemoderate · GHSA-4g23-2xm8-66gc
- Nodemailer: Process-global DNS cache reuses TLS `servername` across transports, enabling cross-tenant SMTP credential disclosuremoderate · GHSA-6vj9-mwq6-2f5v
- Nodemailer: A ">" inside a quoted local part ends an angle-addr early in addressparser, delivering to a domain the header does not namemoderate · GHSA-85x2-q946-cp5h
- Nodemailer: A nested comment ends early in addressparser, releasing the rest of the comment as a recipientmoderate · GHSA-8c8m-p3m8-cjg8
- Nodemailer: resolveContent() on a MailMessage bypasses disableFileAccess/disableUrlAccess when called with the legacy signaturemoderate · GHSA-8m3c-c648-2xjj
- Nodemailer: Nested structured recipient arrays bypass the parser depth limit and cause stack exhaustion DoSmoderate · GHSA-8vvx-rff5-p5rq
- Nodemailer has SMTP command injection due to unsanitized `envelope.size` parameterlow · GHSA-c7w3-x93f-qmm8
- Nodemailer: Recipient-domain validation bypass via RFC 5322 comment mis-parsing leads to email delivery to an attacker-controlled domainmoderate · GHSA-cc9r-2j5m-2m83
- Nodemailer: RFC 5322 comment inside an angle-bracket address is never strippedmoderate · GHSA-g73g-hqqh-jr95
- Nodemailer: A ";" inside a quoted string or comment ends an address group early in addressparser, turning display text into a recipientmoderate · GHSA-m943-m63m-w62w
- Nodemailer: Email to an unintended domain can occur due to Interpretation Conflictmoderate · GHSA-mm7p-fcc7-pg87
- Nodemailer: Message-level raw option bypasses disableFileAccess/disableUrlAccess, enabling arbitrary file read and full-response SSRF in the delivered messagehigh · GHSA-p6gq-j5cr-w38f
- Nodemailer: Improper TLS Certificate Validation in OAuth2 Token Fetch Enables Credential Interceptionhigh · GHSA-r7g4-qg5f-qqm2
- Nodemailer’s addressparser is vulnerable to DoS caused by recursive callshigh · GHSA-rcmh-qjqh-p98v
- Nodemailer: Quadratic backtracking in the addressparser free-text fallback allows remote denial of servicehigh · GHSA-v53p-9fqp-m79j
- Nodemailer Vulnerable to SMTP Command Injection via CRLF in Transport name Option (EHLO/HELO) moderate · GHSA-vvjj-xcjg-gr5g
- Nodemailer: IDN/Punycode domain allow-list bypass leads to email delivery to an attacker-controlled domainmoderate · GHSA-wmmp-3585-3rmp
- Nodemailer jsonTransport bypasses disableFileAccess and disableUrlAccess during message normalizationmoderate · GHSA-wqvq-jvpq-h66f
- 10.4.1
A security patch release.
- 8.0.9
Two pending security advisories (jsonTransport access bypass, List-* CRLF injection)
- 8.0.5
Sanitize CRLF in transport name option to prevent SMTP command injection (GHSA-vvjj-xcjg-gr5g)
- 8.0.4
Sanitize envelope size to prevent SMTP command injection
- 7.0.6
ReDoS vulnerability in parseDataURI and _processDataUrl
Release by release
- New
AbortSignal per send:
sendMail({ ..., signal })on SMTP and pooled SMTP. An abort removes a queued message from the pool, or closes only the connection delivering it, and the send fails with anAbortError(codeEABORT). Other transports honor a signal that is already aborted and otherwise ignore it. Note that an abort late in DATA does not prove the server did not accept the message, so do not treatEABORTas safe to retry blindly. - New
DKIM: the
d=domain is encoded with UTS-46 mapping, the same way as the address headers. - New
Header encoding: plain text that a receiver would decode as an encoded-word without it being a valid one (such as
=?utf-8?Q?a b?=across a space) is now encoded. A valid encoded-word is still passed through, so subjects that are already encoded are not encoded twice. - New
SMTP connection: a supplied socket no longer connects, and TLS no longer starts, after the connection was closed.
- New
- Fixed
dkim: encode the d= domain the same way as the address headers
- Fixed
mime-funcs: encode header text that would be decoded as an invalid encoded word
- New
- Security
A security patch release.
- New
Recipient domains with internationalized characters are mapped the same way
url.domainToASCIIand other UTS-46 validators map them. Previously a few characters could encode to a different domain than the validator approved. Affected since 9.1.0. - New
Address parsing: whitespace or a comment around a dot in a domain is read the way RFC 5322 parsers read it, as part of one domain. Previously the domain ended there and the rest moved into the display name.
- New
Well-known services:
service: 'SpacePost'(smtp.spacepost.dev, port 25976, STARTTLS required). - Fixed
addressparser: read whitespace and comments around a dot of the domain as CFWS
- Fixed
mime-node: hand a domain to the UTS-46 mapper without lowercasing it first
- Security
- New
transporter.close({ force: true })closes busy pooled connections as well as idle ones. The messages they were delivering fail at once with an error instead of being queued again, and messages still waiting in the queue fail as they do on a plainclose(). - New
close()without arguments is unchanged: idle connections close immediately and a connection in the middle of a delivery finishes it first. - New
Let close({ force: true }) end pooled connections that are delivering a message
- New
- Fixed
Apply the otp option in MailComposer too
- Fixed
- New
New
otpmessage option:otp: { code: '123456', origin: 'https://example.com' }addsOTP-Token: "123456"; origin="https://example.com". The origin is reduced to its canonical form, only https (or http on a loopback host) is accepted, and invalid values fail the send with the newEOTPerror code. See Message configuration. - New
A custom
OTP-Tokenheader is no longer MIME word encoded. Line breaks and control characters are still removed. - New
OTP-Tokenis included in the DKIM signature by default. - New
A
Content-IDheader, from an attachmentcidor set throughheaders, is now encoded as a message id rather than as text, so acidwith a non-ASCII character or a quote keeps matching thecid:URL in the HTML. - New
Groundmail added to the well-known services.
- New
Add the otp option for the OTP-Token header
- Fixed
Encode a Content-ID header as a message id
- New
- Breaking
Drop the comments of a Content-Type or Content-Disposition value with the stripComments option
- Breaking
- New
Add info.serverMessageId from the final 250 reply
- New
Add pendingCount() to the SMTP pool
- New
Make header value encoding public with MimeNode encodeHeaderValue()
- New
Mark SMTP errors as permanent or transient with err.permanent
- Fixed
Label an ASCII message/rfc822 attachment 7bit instead of 8bit
- Fixed
Report the recipients an LMTP server refuses after DATA in rejectedErrors
- New
6 other lines we could not sort, mostly version bumps
- 10.5.0
Anyone who signs with DKIM for a domain written with upper case or mapped non-ASCII characters (an upper case IDN label, or one holding a soft hyphen). The
d=tag named a different domain thanFrom:, so verification and DMARC alignment failed. - 10.5.0
Anyone who wants to cancel or time-limit a single send without closing the transport or pool.
- 10.4.1
Everyone who passes user-supplied recipient addresses to Nodemailer, especially applications that restrict recipients by domain. Both fixes close a gap between the domain a validator reads and the domain in the SMTP envelope.
- 10.3.0
Anyone sending one-time passcodes by email who wants them to be machine-readable.
- 10.3.0
Anyone already setting an
OTP-Tokenheader throughheaders: before this release it went out MIME encoded and could not be parsed. - 10.3.0
Anyone embedding images with a
cidthat holds a non-ASCII character or a quote.
1 internal line (docs, tests, tooling) left out.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.