CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-CC9R-2J5M-2M83

GHSA-CC9R-2J5M-2M83: Parser Differential and Domain Validation Bypass in Nodemailer

Alon Barad
Alon Barad
Software Engineer

Sep 9, 2026·3 min read·6 visits

Executive Summary (TL;DR)

Parser misalignment in Nodemailer allows attackers to bypass email validation and route sensitive emails to unauthorized domains using RFC 5322 comments.

A critical parser differential vulnerability exists in Nodemailer prior to version 9.1.0. An attacker can bypass recipient-domain validation checks by utilizing RFC 5322 comments, leading to unauthorized email routing.

Vulnerability Overview

A critical parser differential vulnerability, identified as GHSA-CC9R-2J5M-2M83, exists in Nodemailer versions prior to 9.1.0.\n\nThis vulnerability arises from a misaligned implementation of the Comments and Folding White Space (CFWS) specifications defined in RFC 5322.\n\nThe parsing discrepancy allows remote attackers to bypass application-level recipient-domain validation checks.\n\nSuccessful exploitation can result in the unauthorized delivery of sensitive transactional emails to an attacker-controlled destination.

Root Cause Analysis

Under RFC 5322, comments enclosed within parentheses represent Folding White Space (CFWS) and function as semantic delimiters.\n\nIn Nodemailer's unpatched custom address parser located in lib/addressparser/index.js, the tokenizer failed to treat the closing parenthesis of a comment as a delimiter when followed by non-break characters.\n\nInstead, the parser incorrectly applied a noBreak state across the comment boundary, causing it to join the preceding and succeeding text tokens together during reconstruction.\n\nFor example, the parser processes the input user@good-corp.com(comment)evil.com by discarding the comment but directly concatenating the domain strings into user@good-corp.comevil.com.

Code Analysis

The vulnerability exists within the state machine of the custom Tokenizer in lib/addressparser/index.js.\n\nIn the vulnerable implementation, the tokenizer class did not recognize the closing parenthesis as a structural boundary.\n\njavascript\n// Vulnerable logic in lib/addressparser/index.js\nif (prevToken && prevToken.noBreak && data[state].length) {\n data[state][data[state].length - 1] += token.value;\n}\n\n\nThe official patch introduced in commit 902b63e935435c30f4025901c0902dce64cd8880 mitigates this behavior.\n\njavascript\n// Patched logic in lib/addressparser/index.js\nconst tail = data[state].length ? data[state][data[state].length - 1] : '';\nconst joinsAcrossComment = tail.slice(-1) === '@' || token.value.charAt(0) === '@';\n\nif (prevToken && prevToken.noBreak && data[state].length && (!prevToken.cfws || joinsAcrossComment)) {\n data[state][data[state].length - 1] += token.value;\n}\n\n\nAdditionally, the tokenizer now explicitly flags the closing parenthesis character with a cfws property:\n\njavascript\nif (chr === ')') {\n this.node.cfws = true;\n}\n

Exploitation

An attack requires the target application to utilize two different parsing engines: an RFC-conformant validator and Nodemailer.\n\nThe attacker first registers a domain matching the concatenated suffix, such as good-corp.comevil.com, and establishes a mail exchange server.\n\nNext, the attacker registers on the target application using the payload attacker@good-corp.com(signup)evil.com.\n\nThe application's primary validator analyzes the string, parses the comment, and confirms that the core recipient domain is good-corp.com.\n\nUpon passing validation, the application forwards the address to Nodemailer, which reconstructs the destination as attacker@good-corp.comevil.com and transmits the message to the attacker's mail server.\n\nmermaid\ngraph LR\n A["Input: user@good-corp.com(x)evil.com"] --> B["Validator Engine"]\n B -->|"Parsed: good-corp.com (Valid)"| C["Application Control"]\n C --> D["Nodemailer Engine"]\n D -->|"Parsed: good-corp.comevil.com"| E["Attacker Mailbox"]\n

Impact Assessment

The capability to redirect email delivery from authorized corporate domains to arbitrary external domains compromises critical business logic workflows.\n\nThis flaw allows attackers to intercept sensitive communications, such as password reset links, multi-factor authentication tokens, and billing invoices.\n\nBecause the vulnerability operates silently at the parser level, standard transaction logs may show successful delivery without flagging security exceptions.\n\nThe analytical CVSS v3.1 score for this vulnerability is 9.1 (Critical), reflecting low attack complexity and high confidentiality and integrity impacts.

Remediation

The primary remediation is upgrading Nodemailer to version 9.1.0 or later to ensure proper tokenization of CFWS.\n\nIf upgrading is not immediately feasible, applications should implement input-hardening rules to filter out parentheses in input fields containing email addresses.\n\njavascript\n// Hardened validation rule to reject comments in email fields\nif (/[()]/.test(emailInput)) {\n throw new Error('Invalid characters in email address');\n}\n\n\nUsing a single, unified parser for both validation and transmission phases prevents the emergence of parser differentials.

Fix Analysis (1)

Technical Appendix

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

Affected Systems

Nodemailer npm package versions < 9.1.0

Affected Versions Detail

Product
Affected Versions
Fixed Version
nodemailer
Nodemailer
< 9.1.09.1.0
AttributeDetail
CWE IDCWE-436
Attack VectorNetwork
CVSS9.1 (Critical)
ImpactUnauthorized email routing and interception of sensitive credentials
Exploit StatusPoC available

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1562Impair Defenses
Defense Evasion
CWE-436
Parser Misalignment

The software uses two or more different parsers to process the same input, leading to inconsistent interpretations of boundaries and structural delimiters.

References & Sources

  • [1]GitHub Advisory for Nodemailer
  • [2]Fix Commit
  • [3]Fix Pull Request
  • [4]Nodemailer Release v9.1.0

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•23 minutes ago•CVE-2026-77037
7.5

CVE-2026-77037: File Descriptor Leak and Denial of Service in Multer Disk Storage

A resource consumption vulnerability exists in the multer library version 2.2.0 when utilizing the disk storage engine. When a remote client aborts or truncates an in-progress file upload, multer removes the partial file from the disk but fails to properly close the active write stream. This behavior leaves the underlying file descriptor open in the operating system, allowing a remote attacker to systematically exhaust the server's file descriptor limits and trigger a Denial of Service.

Amit Schendel
Amit Schendel
1 views•5 min read
•about 1 hour ago•CVE-2026-77078
7.5

CVE-2026-77078: Remote Denial of Service in Multer Middleware via Array Suffix Handling

CVE-2026-77078 is a critical denial of service vulnerability in the multer Node.js package, allowing unauthenticated remote attackers to crash the runtime process using a single crafted multipart/form-data HTTP payload.

Alon Barad
Alon Barad
2 views•4 min read
•about 2 hours ago•GHSA-2Q42-4Q24-7RGV
7.9

Path Traversal Vulnerability in Microsoft TypeSpec Core and Emitter Packages

A path traversal vulnerability (CWE-22) in the Microsoft TypeSpec compiler core and associated emitter packages permits unvalidated user input to escape the designated output directory, resulting in arbitrary JSON and YAML file creation or modification on the host system.

Alon Barad
Alon Barad
3 views•7 min read
•about 4 hours ago•GHSA-2X7J-588G-CCC2
7.5

GHSA-2x7j-588g-ccc2: Algorithmic Complexity Denial of Service in Nodemailer

An algorithmic complexity vulnerability in Nodemailer before version 9.1.0 allows remote attackers to block the Node.js event loop. This denial of service is triggered by processing large or complex lists of email addresses, leading to quadratic resource consumption.

Amit Schendel
Amit Schendel
5 views•5 min read
•about 5 hours ago•GHSA-WMMP-3585-3RMP
5.9

GHSA-WMMP-3585-3RMP: IDN/Punycode Domain Allow-list Bypass in Nodemailer

Nodemailer (prior to version 9.1.0) is vulnerable to an IDN/Punycode domain allow-list bypass due to an interpretation conflict between legacy RFC-3492 codecs and modern UTS-46 Unicode parsers.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 6 hours ago•CVE-2026-86996
5.3

CVE-2026-86996: Missing Authorization in n8n AI Agent Workflow Tool Execution

A missing authorization vulnerability (CWE-862) exists in n8n where AI Agent workflows executing as tools bypass the Sub-Workflow Caller Policy settings, allowing authenticated users with agent creation privileges to invoke unauthorized sub-workflows across project boundaries.

Amit Schendel
Amit Schendel
9 views•6 min read