CVE-2025-14874

7.5 HIGH

📋 TL;DR

A denial-of-service vulnerability in Nodemailer allows attackers to crash email-sending applications by sending specially crafted email addresses that trigger infinite recursion in the address parser. This affects any system using vulnerable versions of Nodemailer to process incoming email headers. The vulnerability can be exploited remotely without authentication.

💻 Affected Systems

Products:
  • Nodemailer
Versions: Versions before 6.9.15
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using Nodemailer to parse email addresses from untrusted sources is vulnerable. This includes web applications, APIs, and backend services that process user-submitted email addresses.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service outage of email-sending functionality, potentially affecting dependent applications and services that rely on Nodemailer for email operations.

🟠

Likely Case

Application crashes or becomes unresponsive when processing malicious email headers, requiring manual restart and causing temporary service disruption.

🟢

If Mitigated

Minimal impact with proper input validation and rate limiting in place, though the vulnerable component remains exploitable.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

The vulnerability requires sending a specially crafted email address to trigger the infinite recursion. No authentication is needed if the application accepts email addresses from external sources.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 6.9.15 and later

Vendor Advisory: https://github.com/nodemailer/nodemailer/security/advisories/GHSA-rcmh-qjqh-p98v

Restart Required: Yes

Instructions:

1. Update Nodemailer to version 6.9.15 or later using npm: npm update nodemailer@latest
2. Restart your application to load the updated package
3. Verify the version is 6.9.15 or higher

🔧 Temporary Workarounds

Input Validation Filter

all

Implement server-side validation to reject email addresses with suspicious patterns before they reach Nodemailer's parser

Rate Limiting

all

Implement rate limiting on email submission endpoints to reduce the impact of repeated exploitation attempts

🧯 If You Can't Patch

  • Implement a WAF or reverse proxy with rules to block email addresses containing patterns known to trigger the vulnerability
  • Isolate the email processing service behind additional network segmentation and monitor for abnormal resource usage

🔍 How to Verify

Check if Vulnerable:

Check your package.json or run: npm list nodemailer | grep nodemailer

Check Version:

npm list nodemailer | grep nodemailer

Verify Fix Applied:

Verify the installed version is 6.9.15 or higher: npm list nodemailer

📡 Detection & Monitoring

Log Indicators:

  • Application crashes or restarts related to email processing
  • High CPU usage spikes in email processing functions
  • Error logs containing stack traces with address parser functions

Network Indicators:

  • Multiple failed email submission attempts from single IPs
  • Unusual patterns in email address submissions

SIEM Query:

source="application.logs" AND ("nodemailer" OR "address parser") AND ("crash" OR "high cpu" OR "recursion")

🔗 References

📤 Share & Export