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-WMMP-3585-3RMP

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

Amit Schendel
Amit Schendel
Senior Security Researcher

Sep 8, 2026·6 min read·17 visits

Executive Summary (TL;DR)

Interpretation conflict in Nodemailer allows bypassing domain allow-lists to redirect sensitive emails to attacker-controlled domains.

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.

Vulnerability Overview

Nodemailer versions prior to 9.1.0 are vulnerable to an Internationalized Domain Name (IDN) and Punycode domain normalization bypass. This security flaw allows an attacker to bypass domain-based allow-lists or same-domain verification policies enforced by application logic. Consequently, emails containing sensitive information can be delivered to an unintended, attacker-controlled external domain.

The underlying security vulnerability arises from an interpretation conflict between standard URL parsers used for validation and Nodemailer's internal address normalization engine. Modern web frameworks, browsers, and backend validation packages process email domains using the UTS-46 Unicode standard. Conversely, older versions of Nodemailer processed domain components using a custom, legacy RFC-3492 Punycode codec with no Unicode normalization or compatibility mapping.

This architectural divergence creates a dangerous parsing asymmetry. An attacker can craft a recipient address containing invisible Unicode code points, full-width characters, or normalization discrepancies. The validation tier maps this address to a trusted domain, while Nodemailer resolves and routes it to an entirely separate, attacker-registered domain.

Root Cause Analysis

The root cause of GHSA-WMMP-3585-3RMP lies in the _normalizeAddress function within the lib/mime-node/index.js file. When compiling recipient addresses for the SMTP RCPT TO command, the library attempts to normalize the domain portion. Prior to version 9.1.0, Nodemailer passed the domain directly into a bundled, pure RFC-3492 Punycode library located at lib/punycode/ after only invoking a standard .toLowerCase() operation.

Standard RFC-3492 codecs perform basic encoding without any validation, character mapping, or normalization defined in the modern UTS-46 standard. UTS-46 defines rules for processing Unicode strings into domain labels. Under UTS-46, characters like the soft hyphen (U+00AD) are stripped, full-width characters are mapped to their half-width equivalents, and combined characters are normalized using Normalization Form C (NFC).

Because Nodemailer's legacy encoder bypassed these processing steps, it converted the input string literally. If an application validated an input email like user@compa\u00ADny.com using native APIs like Node's url.domainToASCII, the API stripped the soft hyphen and validated it as company.com. Nodemailer, however, processed the raw U+00AD character directly, yielding the Punycode domain xn--company-pka.com and misrouting the mail.

Code Analysis

The following diagram illustrates the routing and normalization flow of an incoming email address through both the validation layer and the legacy Nodemailer library:

In the vulnerable implementation of lib/mime-node/index.js, the address normalization occurred inside the _normalizeAddress function. The code used a legacy, bundled punycode utility that did not align with WHATWG host requirements or UTS-46 standards. This is the vulnerable code segment:

// lib/mime-node/index.js (v9.0.6 - Vulnerable)
try {
    if (/[\x80-]/.test(user)) {
        // Uses legacy codec which encodes characters literally
        encodedDomain = punycode.toUnicode(domain.toLowerCase());
    } else {
        // Bypasses UTS-46 normalization entirely
        encodedDomain = punycode.toASCII(domain.toLowerCase());
    }
} catch (_err) {
    // Falls back to unnormalized input if encoding fails
}
return `${this._normalizeLocalPart(user)}@${encodedDomain}`;

The security patch introduced a dedicated normalizeDomain helper that selectively utilizes the runtime environment's native urlModule.domainToASCII and urlModule.domainToUnicode utilities. To prevent delimiters from truncating input domains during WHATWG mapping, the maintainers defined a regular expression of unsafe URL characters, forcing the legacy codec fallback if delimiters are present:

// lib/mime-node/index.js (v9.1.0 - Patched)
 
// Prevent delimiters from truncating domains inside the WHATWG host parser
const URL_PARSER_UNSAFE = /[/\\?#%\x00-\x20\x7F]/;
 
function normalizeDomain(domain, toUnicode) {
    // Select the native Node.js mapper if available (Node >= 7)
    const mapper = toUnicode ? urlModule.domainToUnicode : urlModule.domainToASCII;
 
    if (typeof mapper === 'function' && !URL_PARSER_UNSAFE.test(domain)) {
        const mapped = mapper(domain);
        if (mapped) {
            return mapped;
        }
    }
 
    // Fall back to legacy pure Punycode if unsafe characters or old Node version
    return toUnicode ? punycode.toUnicode(domain) : punycode.toASCII(domain);
}

Exploitation

Exploitation of this vulnerability requires that the target application enforces an email domain allow-list, same-domain restriction, or validation step that relies on standard UTS-46 parsers before delegating mail delivery to a vulnerable version of Nodemailer. The attacker must also register the corresponding divergent Punycode domain beforehand.

To conduct a typical attack, the adversary registers a lookalike domain, such as xn--company-pka.com. This domain represents compa\u00ADny.com containing the invisible soft hyphen code point (U+00AD). The attacker then registers or updates an account profile using the address attacker@compa\u00ADny.com containing the invisible character.

When the application processes this input, its native validator strips the soft hyphen and matches it against the approved allow-list for company.com. Once approved, the application calls Nodemailer to transmit sensitive data, such as a password reset token, to the validated email address. Nodemailer processes the raw soft hyphen literal and translates the destination to the attacker's registered domain xn--company-pka.com, routing the email to the attacker's SMTP mail exchanger.

Impact Assessment

The security impact of this vulnerability is classified as Medium, with a CVSS v3.1 base score of 5.9. The primary compromise is the loss of confidentiality. Because sensitive transactional emails, such as password reset tokens, security notifications, multi-factor authentication codes, or tenant-specific alerts, can be silently redirected to an attacker-controlled mailbox, this flaw represents a severe data exposure vector.

The integrity impact is evaluated as Low. Although the application is unaware that the email was misrouted and may register a successful transaction state, the mail payload itself is not altered in transit. The availability impact is rated as None, as exploitation does not degrade the operational availability of the mail-sending system or the SMTP server.

Because this vulnerability does not possess a mapped CVE ID and is a GHSA-only advisory, it is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. No widespread automated in-the-wild exploitation has been documented, but proof-of-concept scripts have demonstrated successful local exploitation against vulnerable test environments.

Remediation

The primary remediation strategy is upgrading the nodemailer dependency to version 9.1.0 or higher. This version natively integrates standard UTS-46 normalization with WHATWG host delimiter hardening, aligning Nodemailer's domain processing with standard application-tier validators.

If upgrading the library is not immediately feasible, developers must implement strict input normalization on the application side. Any email input should be parsed and processed using Node's native url.domainToASCII before performing validation checks or passing the address to Nodemailer. This ensures that both the application validation and the mail-routing components evaluate the exact same domain string.

Furthermore, security teams should implement defensive filters at the application entry points. Reject any email addresses containing unexpected Unicode control characters, soft hyphens, or path delimiters within the domain part. Regular monitoring of outgoing SMTP logs for unusual Punycode domains (identifiable by the xn-- prefix) can also serve as an effective detection mechanism.

Technical Appendix

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

Affected Systems

Nodemailer (< 9.1.0)

Affected Versions Detail

Product
Affected Versions
Fixed Version
nodemailer
Nodemailer
< 9.1.09.1.0
AttributeDetail
CWE IDCWE-436 / CWE-20
Attack VectorNetwork
CVSS Score5.9 (Medium)
Exploit StatusPoC available
KEV StatusNot listed
MitigationUpgrade to Nodemailer 9.1.0+

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
CWE-436
Interpretation Conflict

Vulnerability Timeline

Fix commit for UTS-46 normalization completed
2026-08-31
Hardening commit to isolate native WHATWG host mappers completed
2026-08-31
GitHub Security Advisory published and version 9.1.0 released
2026-09-08

References & Sources

  • [1]GHSA-WMMP-3585-3RMP Advisory
  • [2]Nodemailer PR #1848
  • [3]Nodemailer Release Notes 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

•37 minutes ago•CVE-2026-126297
7.5

CVE-2026-126297: Algorithmic Complexity Denial of Service in NLTK ConllCorpusReader

CVE-2026-126297 (GHSA-v8f3-6phw-6mh9) is an uncontrolled resource consumption and algorithmic complexity vulnerability in the Natural Language Toolkit (NLTK) prior to version 3.10.4. Located in the Semantic Role Labeling (SRL) parser within `nltk/corpus/reader/conll.py`, the flaw allows an attacker to trigger quadratic O(N^2) CPU processing overhead by providing crafted CoNLL-formatted corpus inputs containing decoy span columns or nested full-width verb spans. Applications parsing untrusted linguistic corpora can experience prolonged CPU exhaustion and application-level Denial of Service (DoS).

Amit Schendel
Amit Schendel
1 views•12 min read
•about 2 hours ago•CVE-2026-126298
7.5

CVE-2026-126298: Quadratic Algorithmic Complexity Denial of Service in NLTK Tree.chomsky_normal_form

CVE-2026-126298 (also tracked as GHSA-r53h-rw34-8h97) is an algorithmic complexity Denial of Service (DoS) vulnerability in the Natural Language Toolkit (NLTK) Python library affecting all versions prior to 3.10.4. The vulnerability resides in the nltk.tree.transforms.chomsky_normal_form function and its corresponding public method Tree.chomsky_normal_form(). When transforming a parse tree into Chomsky Normal Form using the default right-factoring strategy, the function repeatedly invokes list.pop(0) inside a loop iterating over all children of a node. In CPython, removing the initial element of a standard list requires an O(N) memory shift operation, causing the overall binarization algorithm to degrade to O(N^2) quadratic time complexity relative to the width of a node. Furthermore, converting horizontal node width into vertical tree depth bypasses initial parsing depth bounds, triggering subsequent stack exhaustion (RecursionError) when recursive methods traverse the mutated structure. Unauthenticated remote attackers who can submit bracketed tree strings to applications invoking this transformation can exhaust single-threaded CPU resources or induce unhandled application exceptions.

Alon Barad
Alon Barad
3 views•12 min read
•about 3 hours ago•CVE-2026-126299
7.5

CVE-2026-126299: Quadratic Algorithmic Complexity Denial of Service in NLTK CCG Lexicon Parser

An algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) before version 3.10.4 allows remote unauthenticated attackers to cause a denial of service via crafted Combinatory Categorial Grammar (CCG) lexicon strings. The parser in nltk.ccg.lexicon.fromstring performs repeated immutable string slicing, concatenation, and regex tail capturing, resulting in O(n^2) CPU consumption when processing wide, flat category definitions.

Alon Barad
Alon Barad
4 views•10 min read
•about 4 hours ago•CVE-2026-126295
7.1

CVE-2026-126295: Path Traversal and Unconfined File Access in NLTK BllipParser

CVE-2026-126295 (also tracked as GHSA-fg9w-wfp5-j933) is a path confinement bypass vulnerability in the Natural Language Toolkit (NLTK) affecting versions 3.10.0 prior to 3.10.4. The flaw resides in nltk/parse/bllip.py within the BllipParser class and its factory method BllipParser.from_unified_model_dir(). Unlike sibling tool wrappers in NLTK that enforce data-root confinement via the nltk.pathsec module, BllipParser passes caller-supplied filesystem paths directly into the third-party bllipparser native C extension without validation. When an application passes untrusted input as model paths or directories to BllipParser, an attacker can force the native extension to open arbitrary files on the local filesystem. This leads to information disclosure through parser diagnostic oracles, local model tampering via shared directories, and denial of service by hanging worker threads on blocking special files (such as FIFOs or device nodes) or exhausting memory via oversized files.

Amit Schendel
Amit Schendel
2 views•11 min read
•about 5 hours ago•CVE-2026-126300
5.3

CVE-2026-126300: Algorithmic Complexity Denial of Service in NLTK TreebankWordTokenizer.span_tokenize

CVE-2026-126300 (GHSA-ffr9-mgrr-wcvr) is an inefficient algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) Python library affecting versions 3.2.5 prior to 3.10.4. The flaw resides in the quote-restoration routine of TreebankWordTokenizer.span_tokenize and NLTKWordTokenizer.span_tokenize, where repeated calls to list.pop(0) over matched quote tokens introduce quadratic O(n^2) time complexity. An unauthenticated remote attacker who supplies input containing long sequences of double-quote characters can exhaust CPU resources and degrade service availability.

Amit Schendel
Amit Schendel
3 views•10 min read
•about 6 hours ago•GHSA-GPWC-27CW-RH9R
5.3

CVE-2026-126301: Quadratic CPU Exhaustion in NLTK LegalitySyllableTokenizer

The Natural Language Toolkit (NLTK) versions 3.6 through 3.10.3 contain an algorithmic complexity vulnerability in the LegalitySyllableTokenizer.tokenize method. When processing tokens composed of continuous runs of vowels, an unguarded string reversal and set membership lookup loop executes in quadratic time relative to the input token length. Remote attackers capable of submitting arbitrary text to applications utilizing this tokenizer can trigger sustained single-core CPU exhaustion and application-level denial of service.

Amit Schendel
Amit Schendel
5 views•10 min read