Critical Malicious Code Vulnerability in chai-as-executed Package
Summary
MAL-2026-337: Malicious code in chai-as-executed (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-as-executed package is an npm library designed to facilitate the execution of assertions in testing environments. It is commonly used in JavaScript applications to enhance testing capabilities. However, this package has been compromised, leading to severe security risks for any system utilizing it. The vulnerability stems from embedded malicious code that can fully compromise the host computer, making it imperative for users to be aware of the risks associated with this package.
Vulnerability Detail
The vulnerability identified in the chai-as-executed package is characterized by the presence of malicious code that can execute unauthorized actions on the host machine. Originating from a malicious source, this code can lead to complete system compromise, allowing attackers to access sensitive information, including secrets and keys stored on the affected system. The implications of this vulnerability are severe, as it not only jeopardizes the integrity of the application but also poses a risk to the entire system it runs on.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall chai-as-executed
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
There are no effective workarounds for this vulnerability other than removing the compromised package. Ensure that your application does not rely on chai-as-executed and consider using alternative libraries that provide similar functionality without the associated risks.
Conclusion
The chai-as-executed package has been identified as containing malicious code that poses a significant risk to any system using it. Immediate action is required to remove the package and secure any sensitive information. Users are encouraged to utilize tools like Vulert for ongoing monitoring of vulnerabilities in their projects.
See every vulnerability recorded for chai-as-executed →
FAQ
Chai-as-executed is an npm library used for executing assertions in JavaScript testing environments, enhancing the testing capabilities of applications.
The malicious code can fully compromise your system, allowing attackers to access sensitive information and potentially control your computer remotely.
Immediately uninstall the chai-as-executed package and rotate any sensitive information stored on the affected system.
No, there is currently no patched version available for the chai-as-executed package. The only solution is to remove it entirely.
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 if your application is affected by this vulnerability using the Vulert playground without any signup.