Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nodemailer security vulnerability #4339

Closed
srihakum opened this issue Nov 17, 2020 · 4 comments
Closed

nodemailer security vulnerability #4339

srihakum opened this issue Nov 17, 2020 · 4 comments

Comments

@srihakum
Copy link

srihakum commented Nov 17, 2020

The version of node module nodemailer is quite old and affected by the below mentioned security vulnerability. Fix is required on Loopback 3 as well

CVE-2020-7769:
This affects the package nodemailer before 6.4.16. Use of crafted recipient email addresses may result in arbitrary command flag injection in sendmail transport for sending mails.

Scanning the latest shows that we're pulling in [email protected], which is old than recommended! Looking at the code in that old version (https://github.com/nodemailer/nodemailer/blob/533b94593f133cf353bca4b2648c1fb8326b7d0e/lib/sendmail-transport/index.js) the problem is still there.

@dhmlau
Copy link
Member

dhmlau commented Nov 18, 2020

@srihakum, thanks for reporting this. Would you like to submit a PR? Thanks.

@bajtos
Copy link
Member

bajtos commented Nov 23, 2020

Please note: if your application is not using LoopBack's built-in Email model & the email connector, then I believe you are not affected by this vulnerability - the vulnerable code is invoked only when you are sending an email.

As the first step, we need you to compile a list of breaking changes made by nodemailer since the version 4 used by LoopBack now, so that we can asses the impact on LoopBack users if we upgrade to the latest version 6, and post the list as a comment in this issue. I would start looking here: https://github.com/nodemailer/nodemailer/blob/master/CHANGELOG.md

@jannyHou
Copy link
Contributor

jannyHou commented Nov 23, 2020

The related breaking changes would be:

  • Start using dns.resolve() instead of dns.lookup() for resolving SMTP hostnames. Might be breaking change on some environments so upgrade with care. link

  • SMTPConnection: use removeListener instead of removeAllListeners (xr0master) [ddc4af15] Using removeListener should fix memory leak with Node.js streams. link

@jannyHou
Copy link
Contributor

released as 3.28.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants