Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. nodemailer
  4. ›
  5. GHSA-g57g-f23g-4646

GHSA-g57g-f23g-4646: Nodemailer: Quoted local-part can produce malformed envelope recipient through RFC 5322 comment parsing

September 29, 2026

Nodemailer’s address parser can produce an unexpected recipient address when an RFC 5322 comment follows the domain of an address whose local-part is a quoted string.

For example:

"user"@example.com(x)evil.com

is parsed as:

{
address: "user@example.com evil.com",
name: ""
}

The resulting address therefore contains additional attacker-controlled domain text separated by a literal space.

The parsed .address value is subsequently propagated into the SMTP envelope:

src/addressparser/index.ts
↓
recipient.address
↓
src/mime-node/index.ts
↓
envelope.to

The envelope construction uses the parsed address without another strict address validation step.

This appears to be a variant of the RFC 5322 comment parsing issue addressed by GHSA-cc9r-2j5m-2m83, but it follows a different parser path when the local-part is quoted.

References

  • github.com/advisories/GHSA-g57g-f23g-4646
  • github.com/nodemailer/nodemailer/commit/2f36eb1aa1dd33e312411dc9b888548e14db54ee
  • github.com/nodemailer/nodemailer/releases/tag/v10.0.9
  • github.com/nodemailer/nodemailer/security/advisories/GHSA-g57g-f23g-4646

Code Behaviors & Features

Detect and mitigate GHSA-g57g-f23g-4646 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 9.1.0 before 10.0.9

Fixed versions

  • 10.0.9

Solution

Upgrade to version 10.0.9 or above.

Impact 5.3 MEDIUM

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

Learn more about CVSS

Weakness

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

Source file

npm/nodemailer/GHSA-g57g-f23g-4646.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Wed, 14 Oct 2026 12:19:07 +0000.