Back to Blog
high SEVERITY7 min read

CVE-2025-14874: Nodemailer DoS via Crafted Email Address Header

CVE-2025-14874 is a high-severity Denial of Service vulnerability in Nodemailer that allows an attacker to crash an application by sending a specially crafted email address header. The vulnerability existed in Nodemailer versions prior to 7.0.11 and was present in the `Dise-ador-experto-master` project's `package-lock.json` dependency on version 6.10.1. Upgrading to Nodemailer 7.0.11 resolves the issue by fixing the underlying header parsing logic that could be exploited to cause unbounded resou

O
By Orbis AppSec
•Technically reviewed by Anupam Mediratta•Published May 31, 2026•Reviewed June 3, 2026

Answer Summary

CVE-2025-14874 is a high-severity Denial of Service (DoS) vulnerability (CWE-400: Uncontrolled Resource Consumption) in Nodemailer, a popular Node.js email library. In versions prior to 7.0.11, the email address header parsing logic fails to bound resource usage when processing specially crafted input, allowing an attacker to crash the application. The fix is to upgrade Nodemailer to version 7.0.11 or later, which corrects the underlying parsing logic. Projects using Nodemailer 6.x — such as those with a `package-lock.json` pinned to `6.10.1` — must update their dependency immediately.

Vulnerability at a Glance

cweCWE-400 (Uncontrolled Resource Consumption)
fixUpgrade Nodemailer from 6.10.1 to 7.0.11, which corrects the header parsing logic to prevent unbounded resource consumption.
riskAn attacker can crash the application by submitting a malformed email address header, causing unbounded CPU or memory consumption.
languageNode.js (JavaScript)
root causeNodemailer's header parsing logic did not enforce resource limits when processing specially crafted email address input, allowing runaway computation.
vulnerabilityDenial of Service via Crafted Email Address Header

CVE-2025-14874: How a Crafted Email Header Could Bring Down Your Nodemailer App

Introduction

The package-lock.json file in the Dise-ador-experto-master project locked a dependency on Nodemailer 6.10.1 — a version now known to contain a high-severity Denial of Service (DoS) vulnerability tracked as CVE-2025-14874. This flaw means that any application using Nodemailer 6.10.1 to process or relay email could be forced into an unresponsive state simply by receiving a maliciously crafted email address header. No authentication, no special privileges — just a carefully constructed string delivered to your application's email-handling code.

For developers building applications that send transactional emails, process inbound messages, or validate email addresses using Nodemailer, this is a critical dependency to audit immediately.


The Vulnerability Explained

What Goes Wrong in Nodemailer 6.10.1?

Nodemailer's email address header parsing logic in versions up to and including 6.10.1 contains a flaw in how it processes structured email address fields (such as To:, From:, Cc:, and Reply-To: headers). When a specially crafted string is passed as an email address — particularly one designed to exploit edge cases in the parser's tokenization or regular expression matching — the parser can enter a catastrophic backtracking loop or consume excessive CPU and memory resources before completing (or failing to complete) its work.

This class of vulnerability is sometimes called a ReDoS (Regular Expression Denial of Service) or more broadly a parser exhaustion attack. The attacker doesn't need to compromise your server, steal credentials, or find an open port — they just need to get their crafted string into a field that Nodemailer will attempt to parse.

A Concrete Attack Scenario

Imagine your application exposes an endpoint that accepts a recipient email address and sends a confirmation email:

// Vulnerable application code using Nodemailer 6.10.1
const nodemailer = require('nodemailer'); // pinned to 6.10.1

app.post('/send-confirmation', async (req, res) => {
  const { recipientEmail } = req.body;

  const transporter = nodemailer.createTransport({ /* config */ });

  await transporter.sendMail({
    from: 'no-reply@example.com',
    to: recipientEmail,  // <-- attacker-controlled input
    subject: 'Confirm your account',
    text: 'Please confirm your account.'
  });

  res.send('Email sent!');
});

An attacker submits a POST request with a recipientEmail value like:

"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa (crafted nested comment or quoted-string payload)"

Nodemailer 6.10.1's address parser attempts to tokenize and validate this input. Due to the flaw in its parsing logic, the process becomes stuck in a near-infinite loop — consuming 100% of one CPU core and potentially exhausting the Node.js event loop. Because Node.js is single-threaded, all other requests to your application are blocked until the parser either completes or the process is killed.

A single HTTP request can effectively take your entire application offline.

Why package-lock.json Is the Smoking Gun

The package-lock.json file in Dise-ador-experto-master explicitly pinned:

"nodemailer": {
  "version": "6.10.1",
  ...
}

Lock files are designed to ensure reproducible builds — which is exactly what you want. But they also mean that a known-vulnerable version will keep being installed on every npm ci or npm install run until the lock file is updated. This is why automated dependency scanning and timely upgrades are essential parts of a secure development workflow.


The Fix

The Upgrade: Nodemailer 6.10.1 → 7.0.11

The fix applied in this pull request is a direct major version upgrade of Nodemailer:

Property Before After
Package nodemailer nodemailer
Version 6.10.1 7.0.11
Upgrade Type — Major (v6 → v7)
CVE Fixed — CVE-2025-14874
# package-lock.json (simplified)
  "nodemailer": {
-   "version": "6.10.1",
+   "version": "7.0.11",
    "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-...",
    ...
  }

What Changed in Nodemailer 7.x?

Nodemailer 7.0.11 includes a hardened rewrite of the email address header parsing subsystem. The fix addresses the root cause by:

  1. Bounding the parser's complexity — The new parser enforces limits on recursion depth and token count when processing address headers, preventing any single input from consuming unbounded resources.

  2. Replacing vulnerable regex patterns — Patterns that were susceptible to catastrophic backtracking have been replaced with linear-time parsing logic that cannot be forced into exponential behavior regardless of input.

  3. Stricter input validation at ingestion — Malformed or excessively long address components are now rejected early in the pipeline, before any expensive parsing work begins.

Why This Is a Major Version Bump

The jump from 6.x to 7.x signals breaking changes in Nodemailer's public API. Before upgrading in production, developers should review the Nodemailer v7 migration guide and test their transporter configurations, message options, and any custom transport plugins. The security benefit is unambiguous, but the upgrade requires deliberate testing — not just a version number change.


Key Takeaways

  • Nodemailer 6.10.1's address header parser could be exploited with a single crafted string — no authentication required — to exhaust CPU and block the Node.js event loop entirely.
  • The package-lock.json in Dise-ador-experto-master was the direct cause of the vulnerable version being installed — lock files preserve vulnerabilities as faithfully as they preserve stability.
  • Upgrading to Nodemailer 7.0.11 is a major version change, meaning you should test your email-sending code paths thoroughly before deploying to production.
  • User-supplied email addresses passed directly to Nodemailer's to/from fields without prior validation are the primary attack surface — always validate before parsing.
  • Automated dependency scanning (npm audit, Dependabot) would have flagged this vulnerability before it required an emergency fix — integrate these tools into your CI pipeline now.

Conclusion

CVE-2025-14874 is a sharp reminder that email-handling libraries are not immune to Denial of Service vulnerabilities — and that a single malformed header value is all it takes to bring a Node.js application to its knees. The Dise-ador-experto-master project's reliance on Nodemailer 6.10.1, locked in package-lock.json, created a silent but serious risk for anyone running this application in a production environment where email addresses could be influenced by external users.

The fix is clear: upgrade to Nodemailer 7.0.11, validate email inputs before they reach the library, and invest in automated dependency monitoring so vulnerabilities like this are caught — and fixed — before they become incidents.

Secure your dependencies. Validate your inputs. Keep your lock files current.


This post was prepared by the Orbis AppSec team as part of our automated vulnerability remediation and security education program.

Prevention and further reading

Related Articles

medium

path-to-regexp 0.1.12 DoS: Catastrophic Backtracking on Malformed URL

path-to-regexp version 0.1.12 contains a regular expression engine vulnerability where maliciously crafted URL parameters trigger exponential backtracking, causing CPU exhaustion and service unavailability. Upgrading to version 0.1.13 eliminates the vulnerable pattern from the parsing logic.

critical

CVE-2026-59873: node-tar 7.5.11 DoS via Crafted Gzip Bomb

node-tar versions 7.5.11 through 7.5.18 are vulnerable to a denial-of-service attack through maliciously crafted gzip archives that decompress to disproportionately large sizes. An attacker can exploit this to exhaust memory and CPU resources by submitting a small, highly compressed archive that expands beyond configured limits during extraction.

high

MapManager.get() Race Condition Duplicates API Requests

The MapManager's `get(mapUid, cache)` method used a check-then-act pattern that permitted multiple concurrent requests to pass the cache miss check simultaneously, triggering redundant API calls and risking cache corruption. The fix introduces a `_pending` promise map to deduplicate in-flight fetches for identical map UIDs.

critical

Lampa Desktop Auto-Update Heuristic Bypass: Execution of Unverified

Lampa Desktop's auto-update mechanism downloaded JavaScript and CSS from `raw.githubusercontent.com` using only heuristic validation—file size thresholds and string pattern matching—that attackers could trivially satisfy. The fix introduces cryptographic integrity verification by cross-referencing Git blob hashes from the GitHub Contents API, ensuring downloaded code matches the repository's authoritative state before execution.

high

adm-zip 0.6.0 Preserves SUID Bits From ZIPs: CVE-2026-102282

The `adm-zip` dependency resolved to 0.6.0 in this project's dependency tree, a version affected by CVE-2026-102282: during extraction it applies the Unix permission bits stored in each ZIP entry's external file attributes verbatim, including the setuid (`04000`), setgid (`02000`), and sticky bits. An attacker who controls an archive passed to `extractAllTo()` or `extractEntryTo()` can therefore have the extractor create a setuid binary owned by whatever user the extraction process runs as. The

high

requestInput() Type Confusion: NaN and Object Bypass in JavaScript

The `requestInput()` utility function lacked validation on its `type` parameter and failed to handle `NaN` results from float conversions, creating a type confusion weakness. An attacker could supply malformed inputs that propagate unhandled `NaN` values or unexpected object types through the type system. The fix adds explicit guards against `NaN` type parameters and rejects non-primitive type values.