Critical Malicious Code Vulnerability in chai-tests-async Package
Summary
MAL-2026-172: Malicious code in chai-tests-async (npm). Affected versions are not published. 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 chai-tests-async package is a utility for asynchronous testing in JavaScript, commonly used in conjunction with the Chai assertion library. It allows developers to write tests that can handle asynchronous operations, making it easier to ensure code reliability and correctness. However, this package has been found to contain malicious code that compromises the security of any system it is installed on.
Vulnerability Detail
The vulnerability originates from the presence of embedded malicious code within the chai-tests-async package. This code can fully compromise any computer that has the package installed, allowing unauthorized access to sensitive information such as secrets and keys. The malicious nature of the code means that even after removal of the package, there is no guarantee that all traces of the malicious software will be eliminated, posing a significant risk to the integrity of the affected system.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall chai-tests-async
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
Currently, there are no workarounds available to mitigate the effects of this vulnerability other than removing the package and rotating sensitive information.
Conclusion
The discovery of malicious code in the chai-tests-async package poses a serious threat to any system that has it installed. Immediate action is required to remove the package and secure sensitive information. Regular monitoring of your dependencies using tools like Vulert can help prevent future vulnerabilities.
See every vulnerability recorded for chai-tests-async →
FAQ
Chai-tests-async is a JavaScript utility for writing asynchronous tests, commonly used with the Chai assertion library.
The malicious code can fully compromise your system, allowing unauthorized access to sensitive information and potentially leading to data breaches.
You should immediately uninstall the chai-tests-async package and rotate any sensitive information stored on your system.
While removing the package is essential, there is no guarantee that all malicious software will be removed. It is recommended to perform a thorough security audit of your system.
You can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities using just your package-lock.json file. You can check if your application is affected by this vulnerability using the Vulert playground without any signup.