Malicious Code Vulnerability in chai-promised-tools: A Critical Security Risk
Summary
MAL-2026-1683: Malicious code in chai-promised-tools (npm). Affects chai-promised-tools versions 3.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
chai-promised-tools is an npm package designed to enhance the functionality of the Chai assertion library by providing additional promise-related assertions. It is widely used in JavaScript testing environments to facilitate asynchronous testing. However, this package has been identified as having a malicious code vulnerability that can compromise the integrity of applications relying on it.
Vulnerability Detail
The vulnerability in chai-promised-tools stems from the inclusion of malicious code that can execute unauthorized actions within the user's environment. This issue originated from a compromised version of the package, specifically version 3.3.5, which was identified by ReversingLabs. The ramifications of this vulnerability include potential data breaches, unauthorized access to sensitive information, and the ability for attackers to manipulate application behavior. Developers using this package are at risk of exposing their applications to various security threats.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall chai-promised-tools
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 remove the chai-promised-tools package from your project until a secure version is released. You can do this by running the following command: npm uninstall chai-promised-tools. Consider using alternative assertion libraries that do not have known vulnerabilities.
Conclusion
The discovery of malicious code in the chai-promised-tools package poses a significant risk to applications utilizing it. Developers are urged to take immediate action by updating or removing the package to safeguard their applications against potential threats. Utilizing tools like Vulert can help in monitoring and managing open-source vulnerabilities effectively.
See every vulnerability recorded for chai-promised-tools →
FAQ
chai-promised-tools is an npm package that extends the Chai assertion library with additional promise-related assertions for testing asynchronous code.
You can use Vulert, a tool that monitors and alerts for open-source vulnerabilities in your software. By analyzing your package-lock.json file, Vulert can provide real-time alerts about vulnerabilities.
If immediate updates are not possible, consider removing the package as a temporary measure and look for alternative libraries that provide similar functionality without the security risks.
Detailed information about this vulnerability can be found on the GitHub repository of the malicious packages, specifically at the link provided in the vulnerability details.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.