Critical Malicious Code Vulnerability in envforge2 Package
Summary
MAL-2026-16392: Malicious code in envforge2 (npm). Affects envforge2 versions 1.0.1. 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
The envforge2 package, available on npm, is designed for environment configuration in Node.js applications. It is intended to facilitate the management of environment variables through a dotenv-style utility. However, the package has been compromised, embedding malicious code that executes harmful commands on Windows systems, posing significant security risks to users.
Vulnerability Detail
The vulnerability originates from the envforge2 package version 1.0.1, which contains a hidden Windows dropper that activates upon importing the package or using its command-line interface. This dropper extracts a base64-encoded PowerShell command from a JPEG file included in the package, writes a self-deleting VBS script to the system's temp directory, and executes it to run the PowerShell command. This behavior allows an attacker to gain control over the affected system, leading to potential data breaches and unauthorized access to sensitive information.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall envforge2
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 workaround, users should avoid using the envforge2 package and consider alternative packages for managing environment variables. Additionally, ensure that all secrets and keys stored on the affected system are rotated immediately to mitigate potential risks.
Conclusion
The envforge2 package has been identified as containing malicious code that poses serious security threats to users. Immediate action is required to remove the package and secure any compromised systems. Utilizing tools like Vulert can help in monitoring for such vulnerabilities in the future.
See every vulnerability recorded for envforge2 →
FAQ
You should uninstall the envforge2 package immediately using the command npm uninstall envforge2.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Visit Vulert Scanner to check your application without needing to sign up.
The risks include unauthorized access to your system, potential data breaches, and the execution of malicious commands that could compromise sensitive information.
No, there is currently no patched version available for the envforge2 package. The best course of action is to remove it entirely.
Regularly monitor your dependencies for vulnerabilities using tools like Vulert, and ensure that you only use well-maintained and trusted packages.