Intel

AIKIDO-2026-804227

nodemailer is vulnerable to Regular Expression Denial of Service (ReDoS)

Regular Expression Denial of Service (ReDoS)GHSA-4ffr-jq9g-5ffx Published 2 days ago

59

Medium Risk

This Affects:

JSnodemailer
3.0.0 - 10.0.12
Fixed in 10.0.13
Are you affected? Scan for Free

TL;DR

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.

Who does this affect?

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.

Background info

nodemailer is vulnerable to Regular Expression Denial of Service (ReDoS) in versions 3.0.0 - 10.0.12.

How to fix this

Upgrade the nodemailer library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform