Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. nodemailer
  4. ›
  5. GHSA-2x7j-588g-ccc2

GHSA-2x7j-588g-ccc2: Nodemailer: Quadratic (O(n²)) time complexity in addressparser allows remote denial of service via a crafted address list

September 8, 2026

Nodemailer’s address parser (lib/addressparser/index.js) parses a list of comma‑separated addresses in quadratic time — O(n²) in the number of addresses. A single crafted address string (e.g. a To, Cc, Bcc, From, or Reply‑To value, or any value passed to the exported addressparser) therefore consumes CPU proportional to the square of its length and blocks Node’s single‑threaded event loop for the entire duration, denying service to every other request in the process.

This requires no special application configuration and no cooperating receiver — it is entirely inside the parser and triggers on the library’s default code path. A ~1.5 MB address value freezes the process for ~25–30 seconds of 100% CPU; the cost grows with the square of the input, so a few‑MB value stalls the server for minutes. It is a distinct issue from the recursion DoS fixed as CVE‑2025‑14874 (that path is guarded by a nesting‑depth cap; this one is a flat, comma‑separated list with no such limit).

References

  • github.com/advisories/GHSA-2x7j-588g-ccc2
  • github.com/nodemailer/nodemailer/commit/34da64282dcdc9b0581c721a27ab2fa226673150
  • github.com/nodemailer/nodemailer/commit/7cc38af418ffa6fc7e86085195ca5ca681694b3e
  • github.com/nodemailer/nodemailer/commit/9116da9528c6524cefaed75185602a7e85d20434
  • github.com/nodemailer/nodemailer/pull/1848
  • github.com/nodemailer/nodemailer/releases/tag/v9.1.0
  • github.com/nodemailer/nodemailer/security/advisories/GHSA-2x7j-588g-ccc2

Code Behaviors & Features

Detect and mitigate GHSA-2x7j-588g-ccc2 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 9.1.0

Fixed versions

  • 9.1.0

Solution

Upgrade to version 9.1.0 or above.

Impact 7.5 HIGH

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

Learn more about CVSS

Weakness

  • CWE-400: Uncontrolled Resource Consumption
  • CWE-407: Inefficient Algorithmic Complexity

Source file

npm/nodemailer/GHSA-2x7j-588g-ccc2.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Tue, 22 Sep 2026 12:19:56 +0000.