nodemailer is vulnerable to Improper Certificate Validation
59
Medium Risk
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.
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.
nodemailer is vulnerable to Improper Certificate Validation in versions 5.0.0 - 10.0.1.
Upgrade the nodemailer library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.