Skip to main content
VulnerabilityPublished

Nodemailer: Nested structured recipient arrays bypass the parser depth limit and cause stack exhaustion DoS

Affects nodemailerSource GCVE Database

0

CVSS 5.9 Medium : upgrade to 10.0.2 when convenient.

Data as of 29 Sep 2026, 21:21 UTC

CVSS 3.1 base score
5.9Medium
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 10.0.2
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

What to do

Upgrade nodemailer to 10.0.2.

Affected software

ProductAffectedFixed in
npmnodemailerAffected
  • <10.0.2
Fixed in
  • 10.0.2

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A patch is available in Nodemailer version 10.0.2 that fixes this vulnerability. Users should upgrade to version 10.0.2 or later. Applications should also validate and flatten recipient arrays before passing them to Nodemailer or catch exceptions around the complete sendMail() invocation to prevent process termination. Explicit validation to reject deeply nested recipient arrays can mitigate this issue if upgrading is not immediately possible.

Description

Nodemailer versions up to 10.0.1 improperly handle deeply nested recipient arrays in fields like to, cc, and bcc. This flaw causes a stack exhaustion denial-of-service (DoS) when processing such inputs, leading to a RangeError and potential termination of the Node.js process. The vulnerability arises because only the outermost array is flattened before passing nested arrays to a parser that converts them to strings recursively, exhausting the V8 call stack. No SMTP server or successful email delivery is required to trigger this. The issue is fixed in version 10.0.2.

References

Community reviews

Loading reviews…