Malicious Code Injection in promises-dotenv3 Package

promises-dotenv3 Updated 05 Oct 2026

Summary

04/10/2026
CRITICAL
No i
Critical
Not published

MAL-2026-17519: Malicious code in promises-dotenv3 (npm). Affects promises-dotenv3 versions 1.0.0. 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 promises-dotenv3 package is a Node.js library designed to facilitate the loading of environment variables from .env files into Node.js applications. It is intended to simplify the management of configuration settings across different environments. However, this package has been identified as a typosquat of legitimate dotenv-family packages, which poses significant security risks due to its malicious payload.

Vulnerability Detail

The vulnerability stems from the promises-dotenv3 package version 1.0.0, which executes an obfuscated payload upon module load. When the package is required, it reads a hidden payload embedded in an image file and writes a VBS script to the OS temp directory. This script is then executed using wscript.exe, which in turn invokes PowerShell with attacker-controlled commands. This malicious behavior compromises the security of the host system by executing unauthorized commands.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall promises-dotenv3

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

As a temporary workaround, you can avoid using the promises-dotenv3 package altogether and switch to a trusted alternative like dotenv. Ensure that your package.json does not include any typosquatted packages.

Conclusion

The promises-dotenv3 package poses a significant security risk due to its malicious payload that executes unauthorized commands on the host system. It is essential to remove this package and replace it with trusted alternatives to safeguard your application. Regular monitoring and validation of dependencies can help prevent similar vulnerabilities in the future.

See every vulnerability recorded for promises-dotenv3 →

Share this vulnerability

FAQ

Typosquatting is a malicious practice where attackers create fake packages with names similar to legitimate ones, hoping that users will mistakenly install them.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. You can check your application using the Vulert playground at Vulert Scanner without any signup.

Immediately uninstall the promises-dotenv3 package using the command npm uninstall promises-dotenv3 and replace it with a trusted alternative.

Using malicious packages can lead to unauthorized access to your system, data breaches, and the execution of harmful commands that can compromise your application's integrity.

Always verify the authenticity of packages before installation, use tools like Vulert to monitor for vulnerabilities, and keep your dependencies updated.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall promises-dotenv3

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 →

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