nodemailer is vulnerable to Regular Expression Denial of Service (ReDoS)
59
Medium Risk
Nodemailer's SMTP client checks a peer's EHLO response for supported AUTH mechanisms using four regular expressions that each contain two overlapping alternatives for matching whitespace. When the EHLO response omits a mechanism name, the regex engine tries every partition of the whitespace run before failing, producing quadratic backtracking. A malicious SMTP server or an attacker on the network path can answer EHLO with a long run of whitespace and block the Node.js event loop for a long time before authentication completes. The fix rewrites the AUTH mechanism patterns to remove the overlapping alternation.
You are affected if you are using a version that falls within the vulnerable range and you connect to an SMTP server that is untrusted or reachable by an attacker on the network path.
nodemailer is vulnerable to Regular Expression Denial of Service (ReDoS) in versions 3.0.0 - 10.0.12.
Upgrade the nodemailer library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.