Malicious Code Vulnerability in dotenv-node-promised Package
Summary
MAL-2026-1714: Malicious code in dotenv-node-promised (npm). Affects dotenv-node-promised versions 2.3.5. No fix is published. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
dotenv-node-promised is an npm package that allows developers to manage environment variables in a promise-based manner. It simplifies the process of loading environment variables from a .env file into the Node.js process, making it easier to manage configuration settings in applications. However, this package has been identified to contain malicious code that could compromise the security of applications using it.
Vulnerability Detail
The vulnerability in dotenv-node-promised is characterized by the presence of malicious code that can execute unauthorized actions within the application. This code was introduced in version 2.3.5 of the package, and it poses significant risks, including data leakage, unauthorized access, and potential system compromise. The malicious code was identified by ReversingLabs, which has documented the issue and its implications for users of the package.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall dotenv-node-promised
If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
If you cannot update the package immediately, consider removing dotenv-node-promised from your dependencies and replacing it with a more secure alternative for managing environment variables, such as dotenv or config.
Conclusion
The dotenv-node-promised package has a critical vulnerability due to the presence of malicious code in version 2.3.5. It is essential for developers using this package to update to a patched version or find a secure alternative to mitigate risks associated with this vulnerability.
See every vulnerability recorded for dotenv-node-promised →
FAQ
dotenv-node-promised is an npm package that helps developers manage environment variables in a promise-based manner, simplifying configuration management in Node.js applications.
The vulnerability involves malicious code embedded in version 2.3.5 of dotenv-node-promised, which can lead to unauthorized actions and compromise application security.
You can use the Vulert platform to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
As a temporary measure, consider removing dotenv-node-promised and using a more secure alternative for managing environment variables until you can update.
The vulnerability was identified by ReversingLabs, a cybersecurity firm that specializes in detecting malicious software and vulnerabilities in open-source packages.