Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. nodemailer
  4. ›
  5. GHSA-r7g4-qg5f-qqm2

GHSA-r7g4-qg5f-qqm2: Nodemailer: Improper TLS Certificate Validation in OAuth2 Token Fetch Enables Credential Interception

June 15, 2026

Nodemailer disables TLS certificate verification in its internal HTTPS fetch client through the use of rejectUnauthorized: false inside lib/fetch/index.js.

As a result, OAuth2 token requests trust invalid or self-signed HTTPS certificates and transmit sensitive OAuth credentials over connections that should fail TLS validation.

An attacker in a machine-in-the-middle position can intercept OAuth2 credential exchanges and capture:

  • OAuth client_secret
  • refresh_token
  • access tokens

The issue was verified through runtime testing using a self-signed HTTPS OAuth endpoint.

References

  • github.com/advisories/GHSA-r7g4-qg5f-qqm2
  • github.com/nodemailer/nodemailer/security/advisories/GHSA-r7g4-qg5f-qqm2

Code Behaviors & Features

Detect and mitigate GHSA-r7g4-qg5f-qqm2 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 8.0.8

Fixed versions

  • 8.0.8

Solution

Upgrade to version 8.0.8 or above.

Impact 6.5 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-295: Improper Certificate Validation

Source file

npm/nodemailer/GHSA-r7g4-qg5f-qqm2.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 23 Jun 2026 12:22:45 +0000.