Malicious Code Injection in Troubleshooting Package - npm Vulnerability
Summary
MAL-2026-17641: Malicious code in troubleshooting (npm). Affects troubleshooting versions 0.1.0 – 99.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 'troubleshooting' package is a dependency-confusion tool designed to act as a compatibility shim for various npm packages. It claims to facilitate authorized dependency-confusion tests. However, it has been found to contain malicious code that compromises user data by sending sensitive information over an unsecured HTTP connection.
Vulnerability Detail
The vulnerability arises from the 'troubleshooting' package containing a postinstall script that executes a malicious file, 'beacon.cjs', upon installation. This script sends the hostname, installation path, and current working directory to a remote server (http://185.158.107.175:8787/_ah/dc) in plain HTTP. This poses a significant risk as it can lead to data leakage and unauthorized access to sensitive information. The malicious code is embedded in multiple versions of the package, making it imperative for users to be vigilant about the versions they are using.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall troubleshooting
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, users can remove the 'troubleshooting' package from their project if it is not essential. This can be done using the command: npm uninstall troubleshooting. Additionally, avoid using any versions of the package that are known to be compromised.
Conclusion
The 'troubleshooting' package has been identified as containing malicious code that poses a significant risk to users. It is crucial to update or remove the package to safeguard your application from potential data leaks and unauthorized access. Regular monitoring of your dependencies using tools like Vulert can help maintain the security of your software.
See every vulnerability recorded for troubleshooting →
FAQ
The 'troubleshooting' package is an npm dependency designed to serve as a compatibility shim for other packages, but it has been found to contain malicious code.
The malicious code executes a script that sends sensitive information to a remote server upon installation and when the package is imported.
You should immediately update the package to the latest version or uninstall it if it is not necessary for your project.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software using just the package-lock.json file. You can check your application for vulnerabilities using the Vulert playground without any signup.
Using compromised packages can lead to data breaches, unauthorized access to sensitive information, and potential exploitation of your application.