# CVE-2026-82662: Nodemailer improper TLS certificate validation in OAuth2 token fetch

Source: https://junglewise.ai/threats/cve-2026-82662-nodemailer-improper-tls-certificate-validation-in-oauth2-token  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-31. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-82662 · Severity: medium · CVSS 6.5 · Published 2026-08-31

Nodemailer, a widely-used Node.js library for sending emails, disables TLS certificate validation when fetching OAuth2 authentication tokens. An attacker positioned on the network between a Nodemailer client and an OAuth provider can intercept and steal sensitive credentials including client secrets, refresh tokens, and access tokens, enabling unauthorized email sending and mailbox compromise.

Technologies: [Nodemailer](https://junglewise.ai/threats/technologies/nodemailer). Vendors: [Nodemailer](https://junglewise.ai/threats/vendors/nodemailer).

## Quick answers

**Is CVE-2026-82662 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-82662 being exploited in the wild.

**How severe is CVE-2026-82662?** Medium severity, with a CVSS score of 6.5, published 31 August 2026.

**Which products and versions are affected?** Nodemailer <= 8.0.7.

**Is there a fix for CVE-2026-82662?** A patch was published on 2026-05-26: Fixed in version 8.0.8 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-82662 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-82662?** Check whether you run Nodemailer at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability exists in lib/fetch/index.js where Nodemailer sets rejectUnauthorized: false in its internal HTTPS client, disabling TLS peer certificate verification globally. This allows self-signed and invalid certificates to be accepted, hostname validation to be bypassed, and attacker-controlled HTTPS endpoints to be trusted. An attacker in a man-in-the-middle position can intercept OAuth2 token requests to capture OAuth client_secret, refresh_token, and access tokens. The vulnerability affects versions <= 8.0.7 and is patched in version 8.0.8. Attack vector is network with high attack complexity (requires MITM positioning).

## Affected products

- Nodemailer Nodemailer <= 8.0.7

## Identifiers

- CVE-2026-82662
- GHSA-r7g4-qg5f-qqm2

## Timeline

- 2026-05-26: disclosed
- 2026-05-26: patched: Fixed in version 8.0.8

## References

- [https://github.com/nodemailer/nodemailer/security/advisories/GHSA-r7g4-qg5f-qqm2](https://github.com/nodemailer/nodemailer/security/advisories/GHSA-r7g4-qg5f-qqm2)
- [https://github.com/nodemailer/nodemailer](https://github.com/nodemailer/nodemailer)

## Related threats

- [Nodemailer address parsing bypass in addressparser](https://junglewise.ai/threats/cve-2026-125755-nodemailer-3-0-0-before-10-4-1-contains-an-address-parsing-flaw)
- [Nodemailer address parsing bypass in nested RFC 5322 comments](https://junglewise.ai/threats/cve-2026-121424-nodemailer-from-3-0-0-before-10-1-4-contains-an-address-parsing)
- [Nodemailer addressparser RFC 5322 comment parsing bypass](https://junglewise.ai/threats/nodemailer-a-nested-comment-ends-early-in-addressparser-releasing-the-4e80613c)
- [Nodemailer addressparser group terminator bypass in quoted strings](https://junglewise.ai/threats/nodemailer-a-inside-a-quoted-string-or-comment-ends-an-address-group-b8b045f9)
- [Nodemailer addressparser angle-addr parsing bypass](https://junglewise.ai/threats/nodemailer-a-inside-a-quoted-local-part-ends-an-angle-addr-early-in-28663cfb)
