ZeroHour

CVE-2026-82662

mass

Improper TLS Certificate Validation in Nodemailer Exposes OAuth2 Credentials

CVSS 4.0
8.3 high
EPSS
<1%p2
Published
()
Modified
AI analysis

Nodemailer versions before 8.0.8 disable TLS certificate verification in its internal HTTP client (lib/fetch/index.js) by setting rejectUnauthorized to false, a case of improper certificate validation (CWE-295). The flaw is triggered when Nodemailer performs OAuth2 token requests, such as exchanging refresh tokens for access tokens; an attacker positioned on the network path between the application and the token endpoint can present any certificate and intercept the HTTPS traffic. In doing so, the attacker captures sensitive OAuth2 credentials in transit, including OAuth client secrets, refresh tokens, and access tokens, which can be reused to access the associated mail account. Any application running an affected Nodemailer version and authenticating via OAuth2 is exposed, though the attacker must already hold a machine-in-the-middle position (reflected in the CVSS 4.0 high attack complexity and present attack requirements). Exploitation is not currently known: there is no public proof-of-concept, the EPSS probability is 0.1% over 30 days, and the issue is not in CISA KEV.

What to do: Upgrade to Nodemailer 8.0.8 or later, which restores TLS certificate verification in the bundled fetch implementation. Audit whether your deployments authenticate with OAuth2 (the only flows affected here); until patching, avoid routing OAuth2 token requests across untrusted network segments and treat any suspected interception as grounds to rotate OAuth client secrets and refresh tokens.

Affected
Nodemailerall versions before 8.0.8
Estimated exposure
masshundreds of thousands to millions of Node.js deployments include Nodemailer (multi-million weekly npm downloads), with the vulnerable OAuth2 code path… — Nodemailer is one of the most widely downloaded npm email libraries with multi-million weekly download counts, so overall exposure is plausibly above 1M installations, but the flaw only manifests in the OAuth2 token-request code path,…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

Nodemailer before 8.0.8 disables TLS certificate verification in lib/fetch/index.js through rejectUnauthorized: false, allowing attackers to intercept OAuth2 token requests. Attackers in a machine-in-the-middle position can capture OAuth client secrets, refresh tokens, and access tokens transmitted over compromised HTTPS connections.

Weakness
CWE-295
Vector
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/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

In the news

No ingested article mentions this CVE yet.