Intel

AIKIDO-2026-52490

nodemailer is vulnerable to Improper Certificate Validation

Improper Certificate ValidationGHSA-6vj9-mwq6-2f5v Published Yesterday

59

Medium Risk

This Affects:

JSnodemailer
5.0.0 - 10.0.1
Fixed in 10.0.2
Are you affected? Scan for Free

TL;DR

Nodemailer keeps a process-global DNS cache in src/shared/index.ts that is keyed by hostname alone but also stores each connection's TLS server name. When multiple direct SMTPS transports in one process resolve the same host with different tls.servername values, the cache returns the first resolver's server name to later connections. Those connections then present and verify that stale SNI, so certificate validation runs against the wrong identity and credentials can be sent to an unintended endpoint. The fix stops caching the server name and derives it per connection from options.servername.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your process opens multiple direct SMTPS transports to the same host with different TLS server names.

Background info

nodemailer is vulnerable to Improper Certificate Validation in versions 5.0.0 - 10.0.1.

How to fix this

Upgrade the nodemailer library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform