CVE-2017-16071: Hijacked Environment Variables in nodemailer-js

nodemailer-js Updated 02 Oct 2025

Summary

29/08/2018
No i
High
7.5

CVE-2017-16071: nodemailer-js is malware. Affects nodemailer-js versions < 1.0.2. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The nodemailer-js package is a popular npm package used for sending emails in JavaScript applications. It provides a simple and convenient API for sending emails using various email providers. However, all versions of this package have been found to be compromised and contain malware. The malware steals environment variables and sends them to attacker-controlled locations.

Vulnerability Detail

The vulnerability in nodemailer-js allows an attacker to hijack environment variables and extract sensitive information from the compromised system. This can include credentials, tokens, and other sensitive data that may be stored in environment variables. The malware then sends this information to the attacker's servers, potentially leading to unauthorized access and data breaches. The exact method of exploitation is not provided in the vulnerability details.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Conclusion

The nodemailer-js package has been found to contain malware that steals environment variables. If you have this package installed, it is crucial to take immediate action to remove it, clear your npm cache, and regenerate any exposed credentials. Additionally, review any services or databases that may have been accessed using the compromised credentials. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for nodemailer-js →

Share this vulnerability

FAQ

The exact method used by the malware to steal environment variables is not provided in the vulnerability details. However, it is likely that the malware hooks into the environment variable retrieval process and intercepts the values before they are used by the application.

If you find nodemailer-js installed in your environment, it is recommended to delete the package, clear your npm cache, ensure it is not present in any other package.json files, and regenerate any sensitive credentials that may have been exposed.

To prevent the installation of compromised packages, it is important to regularly update your packages to the latest versions, use package-lock.json to ensure package integrity, and only install packages from trusted sources. Additionally, monitoring tools like Vulert can help detect and alert you to known vulnerabilities in your dependencies.

Yes, if the stolen environment variables include credentials or tokens for accessing databases or other services, the attacker may be able to use them to gain unauthorized access. It is important to review and secure any services that may have been exposed using the compromised credentials.

Once the environment variables have been stolen and sent to the attacker's servers, it is difficult to recover them. The best course of action is to assume that the stolen data is compromised and take appropriate steps to mitigate the potential impact.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback