Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. nodemailer
  4. ›
  5. GHSA-cc9r-2j5m-2m83

GHSA-cc9r-2j5m-2m83: Nodemailer: Recipient-domain validation bypass via RFC 5322 comment mis-parsing leads to email delivery to an attacker-controlled domain

September 8, 2026

Nodemailer’s email-address parser treats an RFC 5322 comment ( ... ) inside the domain as a point to concatenate the surrounding text, rather than as folding whitespace (CFWS) that terminates the domain. Consequently a recipient address such as user@good-corp.com(x)evil.com is parsed and delivered to good-corp.comevil.com (registrable domain comevil.com, attacker‑controlled), while a conformant RFC 5322 parser terminates the domain at the comment and reads good-corp.com.

An application that decides whether it is allowed to email a recipient by parsing/validating the recipient’s domain — with a strict RFC 5322 parser (used without inspecting parse defects) or with a naive prefix/substring allow‑list — and then hands the raw address to Nodemailer for delivery, can be induced to send mail to a domain the attacker controls. This is an Interpretation Conflict (CWE‑436), the same class as CVE‑2025‑13033, reached through the RFC 5322 comment construct (the “Comments” technique in PortSwigger’s Splitting the email atom research, which produced a Postfix fix).

Severity is Moderate: exploitation requires the app’s domain check to disagree with Nodemailer (see Impact for exactly which parsers do and do not). Verified end‑to‑end against a real RFC 5321 SMTP server (nodemailer 9.0.6 → aiosmtpd).

References

  • github.com/advisories/GHSA-cc9r-2j5m-2m83
  • github.com/nodemailer/nodemailer/commit/902b63e935435c30f4025901c0902dce64cd8880
  • github.com/nodemailer/nodemailer/pull/1848
  • github.com/nodemailer/nodemailer/releases/tag/v9.1.0
  • github.com/nodemailer/nodemailer/security/advisories/GHSA-cc9r-2j5m-2m83

Code Behaviors & Features

Detect and mitigate GHSA-cc9r-2j5m-2m83 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 6.9.16 before 9.1.0

Fixed versions

  • 9.1.0

Solution

Upgrade to version 9.1.0 or above.

Impact 6.5 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-20: Improper Input Validation
  • CWE-436: Interpretation Conflict

Source file

npm/nodemailer/GHSA-cc9r-2j5m-2m83.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 22 Sep 2026 12:22:15 +0000.