Intel

AIKIDO-2026-804227

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

GHSA-4ffr-jq9g-5ffxPublished Oct 5, 2026
October 5, 2026

59

CVE Score

Medium

Regular Expression Denial of Service (ReDoS)

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.

How do I fix this?

Upgrade the nodemailer library to the patch version.

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.

Package

Versions

3.0.0 - 10.0.12

Fixed in 10.0.13

Background info

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

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea