CVE-2025-14874
JavaScript vulnerability analysis and mitigation

Overview

CVE-2025-14874 is a Denial of Service (DoS) vulnerability in Nodemailer's email address parser that allows unauthenticated remote attackers to crash the Node.js process via a crafted email address header containing deeply nested group structures. It affects all Nodemailer versions up to and including 7.0.10 for Node.js. The vulnerability was first reported on December 1, 2025, publicly disclosed on December 18, 2025, and patched in version 7.0.11 released on January 6, 2026. It carries a CVSS v3.1 base score of 7.5 (High) per Feedly/GitHub Advisory, though Red Hat's scoring assigns it 5.3 (Medium) (GitHub Advisory, Red Hat Bugzilla).

Technical details

The root cause is classified as CWE-703 (Improper Check or Handling of Exceptional Conditions). In lib/addressparser/index.js, the _handleAddress function calls addressparser() recursively to flatten nested group structures when processing email address headers. RFC 5322 prohibits nested groups (defined with colons), but the parser did not enforce any recursion depth limit. An attacker can craft a To: header of the form g0: g1: g2: ... gN: user@example.com; with thousands of colon-delimited group tokens, causing the call chain addressparser → _handleAddress → addressparser → ... to repeat until Node.js throws Maximum call stack size exceeded and terminates the process. A public proof-of-concept is included in the GitHub Security Advisory and Red Hat Bugzilla report (GitHub Advisory, Patch Commit, Red Hat Bugzilla).

Impact

Successful exploitation causes an immediate, unrecoverable crash of the Node.js process running Nodemailer, resulting in complete loss of availability for any service dependent on it. A single malicious request is sufficient — no authentication or user interaction is required. In environments using process managers such as PM2 or Forever, repeated exploitation can trigger a continuous restart loop, causing severe resource exhaustion. There is no confidentiality or integrity impact; the vulnerability is purely an availability threat (GitHub Advisory).

Exploitation steps

  1. Reconnaissance: Identify applications or API endpoints that accept user-controlled email address input (e.g., contact forms, registration endpoints, mail relay services) and process it using Nodemailer versions ≤ 7.0.10.
  2. Craft malicious payload: Build a deeply nested group address header by concatenating many colon-delimited group tokens, e.g., g0: g1: g2: g3: ... g3000: user@example.com;. The depth threshold needed to trigger a crash depends on the Node.js call stack size but is typically reachable at ~3000 levels.
  3. Submit the payload: Send the crafted string as the To: (or similar address) field in a request to the target application. This can be done via a web form, API call, or direct SMTP interaction if the application relays user input to Nodemailer.
  4. Trigger infinite recursion: Nodemailer's addressparser processes the header, recursively calling itself for each nested group token with no depth limit, until Node.js throws Maximum call stack size exceeded.
  5. Achieve DoS: The Node.js process terminates immediately. In environments with auto-restart (PM2, Forever), repeated requests sustain a continuous crash-restart loop, exhausting system resources (GitHub Advisory, Red Hat Bugzilla).

Indicators of compromise

  • Logs: Node.js process logs showing RangeError: Maximum call stack size exceeded originating from lib/addressparser/index.js; application crash logs with stack traces referencing addressparser or _handleAddress functions.
  • Network: Inbound HTTP/SMTP requests containing To:, Cc:, or From: header values with an unusually large number of colon (:) characters (e.g., hundreds or thousands); abnormally large address header field lengths.
  • Process: Sudden, repeated termination and restart of the Node.js process (visible in PM2/Forever logs as frequent restarts); elevated CPU usage during restart loops.
  • File System: No file system artifacts expected for this DoS-only vulnerability.

Mitigation and workarounds

The primary remediation is to update Nodemailer to version 7.0.11 or later, which introduces a maximum recursion depth of 50 levels in the address parser, preventing stack overflow while preserving normal functionality (Patch Commit). Red Hat customers should apply available security updates for affected products including Advanced Cluster Management for Kubernetes 2.0, Ceph Storage 8.0, and Developer Hub. IBM Cloud Pak for Business Automation users should apply the April 2026 iFixes (Cloud Pak foundational services 4.17.0) (IBM Advisory). As a temporary workaround where patching is not immediately possible, implement input validation at the application layer to reject or truncate address headers containing an excessive number of colon characters before they reach Nodemailer.

Community reactions

Red Hat tracked the vulnerability via Bugzilla and assessed it as medium severity, with affected products spanning Developer Hub, Advanced Cluster Management for Kubernetes, and Ceph Storage (Red Hat Bugzilla, Red Hat CVE). IBM subsequently issued an advisory addressing the vulnerability in Cloud Pak for Business Automation (IBM Advisory). Splunk also published an advisory (SVD-2026-0307) referencing this CVE. Community reaction was limited, with no notable researcher commentary or significant social media discussion beyond standard CVE tracking aggregators.

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-8mv7-9c27-98vcMEDIUM5.1
  • JavaScript logoJavaScript
  • astro
NoYesJul 20, 2026
CVE-2026-59729MEDIUM5.1
  • JavaScript logoJavaScript
  • astro
NoYesJul 20, 2026
CVE-2026-59728MEDIUM4.3
  • JavaScript logoJavaScript
  • @astrojs/rss
NoYesJul 20, 2026
GHSA-hp3v-mfqw-h74cLOW3.7
  • JavaScript logoJavaScript
  • @astrojs/netlify
NoYesJul 20, 2026
CVE-2026-59730LOW2.1
  • JavaScript logoJavaScript
  • @astrojs/node
NoYesJul 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management