Repository navigation
fix(deps): update dependency nodemailer to v10.0.9 [security] - #3967
Merged
Merged
Conversation
5 tasks done
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:
10.0.2→10.0.9Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Nodemailer: Quadratic backtracking in the addressparser free-text fallback allows remote denial of service
CVE-2026-100700 / GHSA-v53p-9fqp-m79j
More information
Details
Summary
When
addressparserfinds no address by its strict reading, it falls back to pulling one out of the free text with/\s*\b[^@\s]+@[^\s]+\b\s*/. That pattern backtracks quadratically:[^@\s]+is retried from every offset and rescans the run to the next@each time. A single header value holding a long whitespace-free run with no usable@blocks the Node.js event loop for tens of seconds.It is cheaper to exploit than GHSA-prgh-xp8r-p3m5: 273KB is enough for ~43s, where the comment-joined shape needed ~1.5MB for ~10s.
Details
The fallback in
src/addressparser/index.tsran the pattern as a search.[^@\s]+crosses neither whitespace nor@, so from each start offset it scans forward to the next@or to the end of the run and then fails, and the engine simply advances one character and repeats. Three shapes make every offset fail:@at all@has nothing after it@has nothing before itA fourth reaches it with a valid address present but placed past a long run, so the long run is walked before the match is found.
PoC
Measured on 10.0.5:
'[x]'.repeat(40000)(117KB)'[x]'.repeat(40000) + '@'(117KB)'@' + '[x]'.repeat(40000)(117KB)' >' + '>[x][x]'.repeat(40000)(273KB)Impact
Algorithmic-complexity denial of service. Node is single threaded, so the block stalls the whole process. Reachable without authentication anywhere inbound header values are handed to this parser, mailparser being the notable case, and reachable from application input wherever a user-supplied string is used as a message address, since
mime-nodeparsesto,fromandccwhen composing.Patch
The search is replaced by a single linear pass that finds the one offset the pattern can match at, which is then applied there with a sticky regex. Match results are unchanged, verified against the previous implementation over 3.4 million random strings comparing both the match offset and the matched text, plus 800k full-parse comparisons.
Found while validating the report in GHSA-prgh-xp8r-p3m5, not reported externally.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Nodemailer: Quoted local-part can produce malformed envelope recipient through RFC 5322 comment parsing
CVE-2026-100699 / GHSA-g57g-f23g-4646
More information
Details
Summary
Nodemailer's address parser can produce an unexpected recipient address when an RFC 5322 comment follows the domain of an address whose local-part is a quoted string.
For example:
is parsed as:
The resulting address therefore contains additional attacker-controlled domain text separated by a literal space.
The parsed
.addressvalue is subsequently propagated into the SMTP envelope:The envelope construction uses the parsed address without another strict address validation step.
This appears to be a variant of the RFC 5322 comment parsing issue addressed by GHSA-cc9r-2j5m-2m83, but it follows a different parser path when the local-part is quoted.
Reproduction
Input:
Observed parser output:
A second example:
produces:
For comparison, the corresponding unquoted form:
takes a different code path and is handled by the existing protection differently.
Technical Details
The issue is caused by different parsing behavior for quoted and unquoted local-parts.
The quoted-local-part variant allows the comment-separated trailing domain atoms to remain in the resulting
.addressvalue.That value is then used when constructing the message envelope:
No additional strict recipient validation is performed at this boundary.
Security Impact
The confirmed impact is that attacker-controlled comment content can result in a malformed/ambiguous recipient address being accepted by the parser and propagated into
envelope.to.The reporter did not confirm successful delivery to an unintended recipient through a real SMTP server using this exact quoted-local-part variant.
The remaining question is how real SMTP servers and other Nodemailer transports handle an envelope recipient containing a value such as:
An end-to-end SMTP test is required to determine whether this parser behavior results in an exploitable delivery or recipient-validation bypass.
Relationship to GHSA-cc9r-2j5m-2m83
This report is intended as a potential variant/follow-up to GHSA-cc9r-2j5m-2m83.
The existing advisory addresses RFC 5322 comment handling in email domains. This report identifies a separate parser path involving quoted local-parts that can preserve additional domain-like content in the normalized address.
Please evaluate whether this behavior is already covered by the existing fix or represents a remaining parser variant.
Suggested Fix
The parser should consistently reject or correctly terminate addresses containing trailing domain atoms after RFC 5322 comments, regardless of whether the local-part is quoted.
In particular:
should not result in:
The envelope-generation layer should also avoid assuming that a parser-produced address is safe for SMTP delivery without appropriate validation.
Verification Status
Confirmed:
envelope.to.Not confirmed by reporter:
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Release Notes
nodemailer/nodemailer (nodemailer)
v10.0.9Compare Source
Bug Fixes
v10.0.8Compare Source
Bug Fixes
v10.0.7Compare Source
Bug Fixes
v10.0.6Compare Source
Bug Fixes
v10.0.5Compare Source
Bug Fixes
v10.0.4Compare Source
Bug Fixes
v10.0.3Compare Source
Bug Fixes
Configuration
📅 Schedule: (in timezone Europe/Zurich)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.