Nodemailer
CVE-2025-14874
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit crafted address header with nested groups
-
ExploitParser recurses per colon token without depth limit
-
ExecutionNode.js call stack exhausted
-
ImpactProcess crashes (denial of service)
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A10:2025 - Mishandling of Exceptional Conditions
ASVS 5.0
V16 - Security Logging and Error Handling Exception handling framework
|
| Exploitation Conditions | Requires that the application using Nodemailer passes attacker-controlled email address strings into the addressparser (lib/addressparser/index.js) - for example when reflecting untrusted To/From/Cc/group header values supplied by external users. The trigger is a single header containing many nested RFC 5322 group definitions (repeated 'label:' colon tokens), e.g. 'g0: g1: ... gN: victim@example.com;', which the flattening logic recurses over without a depth bound. No authentication, no user interaction, and no special configuration are required once that input path exists. LIMITING FACTOR: Nodemailer is a sender-side library, so deployments that only parse hardcoded or operator-defined addresses never feed untrusted input to the parser and are not realistically exposed; exploitation also affects availability only (process crash), with no data exposure or code execution. |
| Impact | Signals are consistent and point to a real but bounded availability-only issue. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H = 7.5) reflects a network-reachable, unauthenticated, single-request crash with no confidentiality or integrity impact - the 7.5 is driven entirely by A:H. EPSS is low-moderate at 0.56% (44th percentile), and the CVE is NOT on CISA KEV, so there is no evidence of active exploitation. However, POC/exploit code IS publicly available: the GHSA advisory (GHSA-rcmh-qjqh-p98v) and Red Hat Bugzilla 2418133 both document the mechanism, and the vendor test suite ships a working reproducer (buildDeepGroup with depth 3000/10000). The combination is 'publicly available exploit code exists' but not confirmed in-the-wild exploitation - do not conflate the two. The most important caveat is reachability: Nodemailer is a mail-SENDING library, so the vulnerable addressparser only processes attacker-controlled input when the consuming application passes untrusted address-header strings into it (e.g. reflecting user-supplied To/From/Cc values). Where that data path exists, exploitation is trivial and pre-auth; where addresses are hardcoded or operator-controlled, real exposure is far lower than the 7.5 implies. Net: a genuine, easy-to-exploit DoS for exposed deployments, but impact is limited to process crash and real risk hinges on whether untrusted address strings reach the parser. |
| Exploit ScenarioDerived | An attacker submits an email address header of the form 'g0: g1: g2: ... gN: victim@example.com;' - many nested RFC 5322 group labels separated by colons - into any application flow that feeds the value to Nodemailer's addressparser. The parser recurses once per nested group with no depth cap, exhausting the call stack and throwing 'Maximum call stack size exceeded', which terminates the Node.js process. A public PoC exists in the GHSA advisory and the vendor's own regression tests; a single unauthenticated request is sufficient. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 30, 2026
Unbounded recursion in Nodemailer's address parser (npm package versions 3.0.0 through 7.0.10) allows a single crafted email address header to crash the Node.js process, causing a denial of service. Because nested RFC 5322 group syntax is not legal, the parser flattens nested groups by recursively re-invoking itself, and an attacker-controlled header containing many 'label:' colon tokens drives that recursion until the stack is exhausted and the runtime throws 'Maximum call stack size exceeded'. Exploitation requires no authentication, no user interaction, and no special configuration (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, score 7.5), but it only works where an application passes untrusted address strings into the parser; publicly available exploit code exists, EPSS is low at 0.56% (44th percentile), and there is no confirmed active exploitation (no CISA KEV listing).
RemediationAI
Vendor-released patch: upgrade the npm nodemailer package to 7.0.11 or later (fixed from >= 3.0.0 through <= 7.0.10), which enforces MAX_NESTED_GROUP_DEPTH = 50 and safely truncates deeper input; the fix is the commit https://github.com/nodemailer/nodemailer/commit/b61b9c0cfd682b6f647754ca338373b68336a150 (second patch ref: https://github.com/nodemailer/nodemailer/commit/6218b8df), detailed in advisory https://github.com/nodemailer/nodemailer/security/advisories/GHSA-rcmh-qjqh-p98v. No fixed version is listed for the Maven redistribution org.webjars.npm:nodemailer (affected >= 3.0.0 through <= 6.10.1), so consumers of that artifact must either upgrade to the patched upstream npm module, vendor a repackaged build containing the depth-limit commit, or move to a maintained alternative; Red Hat product users should follow the mitigation guidance in https://access.redhat.com/security/cve/CVE-2025-14874 until an errata bundles the updated library. Until patching is possible, the most effective compensating control is to keep untrusted input away from lib/addressparser/index.js: validate or reject inbound To/From/Cc/group header values before parsing - for example cap header length and reject any address string containing multiple RFC 5322 group delimiters - with the trade-off that legitimate (RFC 5322-illegal but tolerated) nested-group addresses will no longer be flattened, so only apply strict rejection on externally sourced headers. Applications that only parse hardcoded or operator-defined addresses are not realistically exposed and can deprioritize the change. Because a triggered overflow terminates the process, run mail-sending or address-processing services under a supervisor with automatic restart (systemd, PM2, or a Kubernetes liveness/restart policy) so a crash degrades to a brief outage rather than a persistent denial of service, and consider running the parser in a worker thread or isolated process to contain the failure - noting these are containment measures, not fixes, since restart loops still impose availability cost under sustained attack.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in maven, npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerable component is lib/addressparser/index.js, the RFC 5322 address parser bundled with Nodemailer. RFC 5322 defines groups using a colon ('Group: member1, member2;') and uses commas to separate members; nested groups are explicitly not allowed. To tolerate malformed real-world input, _handleAddress() flattens any group it encounters by calling addressparser(data.group.join(',')) recursively, and in an attacker payload such as 'g0: g1: g2: ... gN: victim@example.com;' each colon token causes the resulting group body to be re-parsed, producing the cycle addressparser → _handleAddress → addressparser → ... with no depth bound. The flaw is tracked as CWE-703 (Improper Check or Handling of Exceptional Conditions) and corresponds to the uncontrolled-recursion/stack-exhaustion class (CWE-674): recursion depth scales linearly with the number of attacker-supplied colons, so V8 eventually raises 'Maximum call stack size exceeded' and the process terminates. The impact is availability-only with no confidentiality or integrity loss. The upstream fix threads a depth counter through _handleAddress/addressparser and introduces MAX_NESTED_GROUP_DEPTH = 50, returning an empty array for input nested deeper than the limit so that even 3,000- or 10,000-level malicious payloads parse in under a second instead of crashing; accompanying tests confirm truncation beyond depth 50 while preserving legitimate grouped addresses. The CPE cpe:2.3:a:nodemailer:nodemailer:*:*:*:*:*:node.js:*:* reflects the whole unspecific version range of the Node.js library, and the same code is repackaged to downstream consumers including Red Hat Advanced Cluster Management for Kubernetes 2.0, Red Hat Ceph Storage 8.0, and Red Hat Developer Hub.
Know when Nodemailer gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Single unauthenticated network request with no user interaction crashes the process; availability-only impact with no confidentiality or integrity effect, hence A:H and C:N/I:N.
Primary rating from Vendor (redhat).
CVSS VectorVendor: redhat
DescriptionCVE.org
A flaw was found in Nodemailer. This vulnerability allows a denial of service (DoS) via a crafted email address header that triggers infinite recursion in the address parser.
Executive ViewAI
Nodemailer, a widely used Node.js email library, contains an unbounded recursion flaw in its address parser affecting versions 3.0.0 through 7.0.10; an unauthenticated attacker can send a crafted email address header that crashes the Node.js process, causing denial of service. Publicly available exploit code exists, but there is no CISA KEV listing, so while email-dependent workflows could be disrupted, active exploitation has not been confirmed. Leadership should prioritize patching because the issue is remotely triggerable without authentication, though the practical business risk is limited to applications that pass untrusted address strings into the parser.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Affected Products (CPE)CVE.org
More in Nodemailer
View allThis affects the package nodemailer before 6.4.16. Rated critical severity (CVSS 9.8), this vulnerability is remotely ex
The package nodemailer before 6.6.1 are vulnerable to HTTP Header Injection if unsanitized user input that may contain n
Quadratic time complexity in Nodemailer's addressparser component, versions 9.1.0 through 10.0.4, allows remote unauthen
Sandbox bypass in nodemailer <= 9.0.0 exposes arbitrary file read and full-response SSRF to any authenticated applicatio
SMTP command injection in Nodemailer before 8.0.4 lets attackers smuggle arbitrary SMTP verbs (notably RCPT TO) into out
Denial of service in Nodemailer versions before 10.0.6 lets remote, unauthenticated attackers stall the Node.js event lo
Recipient allow-list bypass in Nodemailer 3.0.0 through 10.4.0 lets an application that restricts outbound mail by recip
Nodemailer 3.0.0 through 10.1.3 misparses angle-addresses in its addressparser, letting a crafted recipient value such a
TLS certificate verification is disabled by hardcoded `rejectUnauthorized: false` in Nodemailer's internal HTTPS fetch c
Nodemailer 3.0.0 through 10.1.3 contains a recipient-injection flaw in its bundled addressparser: a semicolon inside a q
Nodemailer's addressparser (versions 3.0.0 through 10.1.3) terminates a nested RFC 5322 comment at the first closing par
Stack exhaustion in Nodemailer before 10.0.2 allows unauthenticated remote attackers to crash an affected Node.js proces
NVD
CVE.org
EPSS
GitHub
VulDB
Exploit-DB