Nodemailer: Nested structured recipient arrays bypass the parser depth limit and cause stack exhaustion DoS
Affects nodemailerSource GCVE Database
CVSS 5.9 Medium : upgrade to 10.0.2 when convenient.
Data as of 29 Sep 2026, 21:21 UTC
- 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:HWhat to do
Upgrade nodemailer to 10.0.2.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmnodemailer | Affected
| Fixed in
|
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
- github.com/nodemailer/nodemailer/security/advisories/GHSA-8vvx-rff5-p5rq (opens in a new tab)
- github.com/nodemailer/nodemailer/commit/ebe084940aef88278afc6016b78c6d1c3821bb66 (opens in a new tab)
- github.com/nodemailer/nodemailer (opens in a new tab)
- github.com/nodemailer/nodemailer/releases/tag/v10.0.2 (opens in a new tab)