Malicious Code Injection in envparse3: A Critical Security Threat
Summary
MAL-2026-16395: Malicious code in envparse3 (npm). Affects envparse3 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
envparse3 is an npm package designed for parsing environment variables in Node.js applications. It provides a simple interface for managing configuration settings through environment variables, making it a popular choice among developers. However, recent findings have revealed that this package contains malicious code that compromises the security of any system where it is installed.
Vulnerability Detail
The vulnerability originates from the package's main entrypoint, which invokes a function that extracts a hidden payload from a bundled JPEG image. This payload is written to the OS temp directory as a self-deleting VBS file and executed using wscript.exe, which in turn launches powershell.exe with a base64-encoded command. The malicious loader is disguised as telemetry functions, making it difficult to detect. Systems running this package are considered fully compromised, and all secrets and keys should be rotated immediately.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall envparse3
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 measure, you can prevent the execution of the malicious code by removing the envparse3 package from your project. Additionally, monitor your system for any unauthorized changes or files that may have been created by the malicious payload.
Conclusion
The envparse3 package has been found to contain malicious code that poses a significant security risk to any system using it. Immediate action is required to remove the package and secure any compromised systems. Regular monitoring and use of tools like Vulert can help prevent future vulnerabilities.
See every vulnerability recorded for envparse3 →
FAQ
envparse3 is an npm package used for parsing environment variables in Node.js applications.
The vulnerability allows malicious code to execute on your system, potentially compromising sensitive information and granting unauthorized access.
Immediately remove the envparse3 package from your project and rotate any secrets or keys stored on the affected system.
Yes, you can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check your application without needing to sign up.
It is advisable to avoid using the envparse3 package until a thorough review and patch have been provided by the maintainers.