Nodejs Email Parser, Recipient Misrouting, CVE-2024-40637 (Critical)

Listen to this Post

How the CVE Works:

The vulnerability exists in email address parsing libraries that fail to correctly handle RFC 5321/5322 standards for quoted local-parts. When a local-part is enclosed in quotes, it can contain special characters like ‘@’ that would otherwise be invalid. A malicious payload like `”[email protected] x”@internal.domain` should be parsed as a complete address for the ‘internal.domain’ recipient. However, the flawed parser incorrectly extracts the unquoted ‘[email protected]’ substring from within the local-part and uses it as the actual routing target. This causes the email to be misdelivered to an unintended external domain (gmail.com) instead of the intended, RFC-compliant recipient within the ‘internal.domain’. This misrouting bypasses security controls and leads to data leakage.
Platform: Node.js
Version: Affected versions
Vulnerability: Email misrouting
Severity: Critical

date: 2024

Prediction: Patch 2024-09-15

What Undercode Say:

git clone https://github.com/sparser/email-address-parser.git
cd email-address-parser
npm test
const parsed = EmailAddress.parse('"[email protected]"@internal.domain');
console.log(parsed.domain); // Shows 'internal.domain'
// But mail is routed to '[email protected]'

How Exploit:

Craft quoted local-parts containing external domains to bypass routing controls and leak sensitive emails to attacker-controlled addresses.

Protection from this CVE:

Update parsing library. Implement strict RFC 5322 validation. Reject local-parts with unescaped @ symbols. Use transport-layer recipient verification.

Impact:

Data leakage through misdelivery. Bypass of domain access controls. Filter evasion. RFC compliance violations.

🎯Let’s Practice Exploiting & Learn Patching For Free:

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top