Sep 9, 2026·3 min read·19 visits
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.
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.
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.
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
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
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.
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.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
nodemailer Nodemailer | < 9.1.0 | 9.1.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-436 |
| Attack Vector | Network |
| CVSS | 9.1 (Critical) |
| Impact | Unauthorized email routing and interception of sensitive credentials |
| Exploit Status | PoC available |
The software uses two or more different parsers to process the same input, leading to inconsistent interpretations of boundaries and structural delimiters.
CVE-2026-9639 (GHSA-j93m-3j9p-m5m8) is a null pointer dereference vulnerability in Canonical LXD affecting versions 5.0.0 through 5.21.4 and 6.0 through 6.8. The flaw resides in the (*lxdBackend).CreateCustomVolumeFromBackup method within lxd/storage/backend_lxd.go. An authenticated attacker with the can_create_storage_volumes permission can upload a crafted custom volume backup tarball that omits the expires_at field on a snapshot entry, triggering an unhandled SIGSEGV panic and terminating the LXD daemon.
An operating system command injection vulnerability (CWE-78) exists in GeoNode versions prior to 5.1.0. The vulnerability occurs in the vector upload processing pipeline when handling user-supplied geospatial files. By supplying a crafted layer name containing shell metacharacters, an authenticated attacker with basic data upload privileges can execute arbitrary commands on the underlying server or container hosting the GeoNode application and Celery worker processes.
GeoNode versions prior to 5.0.3 contain an unrestricted file upload vulnerability (CWE-434) within the document and dataset ingestion architecture. Authenticated low-privileged users can bypass upload validation via direct REST API interactions, file extension masquerading, metadata mutation via PATCH requests, or malicious archive submissions. This allows attackers to store and serve dangerous file types, alter on-disk file references, or trigger path traversal and resource exhaustion during archive extraction.
CVE-2026-55649 is a stored Cross-Site Scripting (XSS) vulnerability in GeoNode versions prior to 5.0.3. The flaw exists because document abstract metadata fields are ingested via the metadata management pipeline and stored in the backend database without HTML sanitization or input neutralization. An authenticated attacker with privileges to create or edit document metadata can inject arbitrary HTML and JavaScript payloads into these fields. When another user, such as an administrator, views the affected document page or catalog listing, the unencoded payload is rendered into the Document Object Model (DOM) and executes within the victim's browser session.
CVE-2026-55622 (GHSA-qx75-2p3r-pwm5) is an improper access control vulnerability (CWE-284) in Canonical LXD and LXC Incus (tracked as GHSA-c9f5-j9c3-mhrg). In multi-tenant deployments utilizing project-based isolation, the REST API handler for instance creation via POST /1.0/instances verifies that the authenticated user has authorization in the destination project specified by the query parameter, but fails to verify whether the user holds read or view permissions for the source instance when executing a copy operation across projects. Consequently, an authenticated client restricted to a single project can clone instances or snapshots from unauthorized projects into their own project, resulting in complete disclosure of the target instance filesystem and embedded credentials.
An authorization bypass vulnerability in Canonical LXD (tracked as GHSA-7mr3-28h5-m5vx and CVE-2026-55621, and as GHSA-64f3-v33m-w89f in Linux Containers Incus) allows an authenticated user with restricted project access to copy custom storage volumes and volume snapshots from unauthorized projects. The flaw resides in the storagePoolVolumesPost REST API handler, which verifies permissions on the destination project but fails to check whether the caller holds view entitlements on the source project or volume specified in the request body.