Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. nodemailer
  4. ›
  5. GHSA-8vvx-rff5-p5rq

GHSA-8vvx-rff5-p5rq: Nodemailer: Nested structured recipient arrays bypass the parser depth limit and cause stack exhaustion DoS

September 29, 2026

Nodemailer 10.0.1 does not safely process deeply nested arrays supplied through recipient fields such as to, cc, and bcc.

The public MimeNodeAddressInput type recursively permits arrays, but MimeNode._parseAddresses() flattens only the outermost array. A remaining nested array is passed to addressparser(), whose Tokenizer coerces the input with .toString(). Native Array.prototype.toString() recursively processes every nested array through join() and toString() until the V8 call stack is exhausted.

A valid 10,021-byte JSON recipient value containing one address wrapped in 5,000 arrays causes:

RangeError: Maximum call stack size exceeded

The exception occurs through the normal sendMail() API before the maxRecipients limit is evaluated. If the integrating application does not catch the synchronous exception around the complete sendMail() invocation, the Node.js worker or server process terminates.

No SMTP server, remote host, large attachment, or successful email delivery is required.

This is distinct from GHSA-rcmh-qjqh-p98v / CVE-2025-14874. The previous vulnerability concerned recursive parsing of RFC 5322 group strings. This report uses Nodemailer’s structured recipient-array input and never reaches the parser’s MAX_NESTED_GROUP_DEPTH protection.

References

  • github.com/advisories/GHSA-8vvx-rff5-p5rq
  • github.com/nodemailer/nodemailer/commit/ebe084940aef88278afc6016b78c6d1c3821bb66
  • github.com/nodemailer/nodemailer/releases/tag/v10.0.2
  • github.com/nodemailer/nodemailer/security/advisories/GHSA-8vvx-rff5-p5rq

Code Behaviors & Features

Detect and mitigate GHSA-8vvx-rff5-p5rq with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 10.0.2

Fixed versions

  • 10.0.2

Solution

Upgrade to version 10.0.2 or above.

Impact 5.9 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-674: Uncontrolled Recursion

Source file

npm/nodemailer/GHSA-8vvx-rff5-p5rq.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Mon, 12 Oct 2026 12:17:08 +0000.