Critical Malicious Code Vulnerability in chai-await Package
Summary
MAL-2026-852: Malicious code in chai-await (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
chai-await is an npm package designed to facilitate asynchronous testing in JavaScript applications. It allows developers to write cleaner and more readable tests by enabling the use of 'await' syntax with chai assertions. However, this package has been found to contain malicious code that compromises the security of any system where it is installed.
Vulnerability Detail
The vulnerability stems from the presence of embedded malicious code within the chai-await 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 this code poses significant risks, including data theft and system manipulation, as it may grant external entities full control over the affected systems.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall chai-await
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 effective workarounds to mitigate the risks posed by this vulnerability other than removing the package entirely and ensuring that all sensitive information is secured.
Conclusion
The discovery of malicious code in the chai-await package poses a serious threat to any system where it is installed. Immediate action is required to remove the package and secure sensitive information. Users are encouraged to utilize tools like Vulert for ongoing monitoring of their dependencies.
See every vulnerability recorded for chai-await →
FAQ
You should uninstall the chai-await package immediately using 'npm uninstall chai-await' and rotate any sensitive information stored on your system.
The malicious code can compromise your system, allowing unauthorized access to sensitive data and potentially granting control to external entities.
No, there is currently no patched version available for the chai-await package.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software by analyzing your package-lock.json file.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.