# Nodemailer addressparser O(n²) complexity denial of service

Source: https://junglewise.ai/threats/duplicate-advisory-nodemailer-addressparser-o-n-2-on-comment-joined-7e26ae29  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-13. Updated: 2026-10-06  
License: CC BY 4.0 with a link back

Severity: high · CVSS 7.5 · Published 2026-09-13

Nodemailer is a Node.js email library used in mail processing systems. The addressparser component has a quadratic time complexity flaw when parsing email addresses containing RFC 5322 comments, allowing attackers to send a single specially crafted email that blocks the application's event loop for up to 7 seconds, causing denial of service. Since mailparser feeds email headers directly into this parser without authentication, any system processing untrusted inbound emails is vulnerable.

Technologies: [Nodemailer](https://junglewise.ai/threats/technologies/nodemailer), [nodemailer (npm)](https://junglewise.ai/threats/technologies/npm-nodemailer). Vendors: [Nodemailer](https://junglewise.ai/threats/vendors/nodemailer), [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** High severity, with a CVSS score of 7.5, published 13 September 2026.

**Which products and versions are affected?** Nodemailer 9.1.0 through 10.0.4; nodemailer (npm) >= 9.1.0, <= 10.0.4.

**Is there a fix for This vulnerability?** Yes: fixed in 10.0.5. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked over the network.

**Am I affected?** Check whether you run Nodemailer or nodemailer (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in 10.0.5

## Technical details

The vulnerability is a CWE-407 inefficient algorithmic complexity issue in the addressparser component's join logic. When parsing addresses with comment-separated atoms (e.g., "a@b(c)@b(c)@b(c)..."), the parser accumulates atoms into a growing string and calls slice(-1) on the entire accumulated string on every token to check the last character, resulting in O(n²) time complexity. The flaw is reachable remotely via mailparser, which parses inbound email headers without authentication; a ~640 KB malicious address header can block the event loop for approximately 7 seconds.

## Affected products

- Nodemailer Nodemailer 9.1.0 through 10.0.4

## Timeline

- 2026-09-11: disclosed
- 2026-09-13: advisory
- 2026-09-13: patched: v10.0.5 released

## References

- [https://github.com/nodemailer/nodemailer/security/advisories/GHSA-prgh-xp8r-p3m5](https://github.com/nodemailer/nodemailer/security/advisories/GHSA-prgh-xp8r-p3m5)

## Related threats

- [Nodemailer address parsing bypass in addressparser](https://junglewise.ai/threats/cve-2026-125755-nodemailer-3-0-0-before-10-4-1-contains-an-address-parsing-flaw)
- [Nodemailer address parsing bypass in nested RFC 5322 comments](https://junglewise.ai/threats/cve-2026-121424-nodemailer-from-3-0-0-before-10-1-4-contains-an-address-parsing)
- [Nodemailer addressparser RFC 5322 comment parsing bypass](https://junglewise.ai/threats/nodemailer-a-nested-comment-ends-early-in-addressparser-releasing-the-4e80613c)
- [Nodemailer addressparser group terminator bypass in quoted strings](https://junglewise.ai/threats/nodemailer-a-inside-a-quoted-string-or-comment-ends-an-address-group-b8b045f9)
- [Nodemailer addressparser angle-addr parsing bypass](https://junglewise.ai/threats/nodemailer-a-inside-a-quoted-local-part-ends-an-angle-addr-early-in-28663cfb)
