Critical Malicious Code Vulnerability in chai-as-approved Package

chai-as-approved Updated 10 Feb 2026

Summary

10/02/2026
CRITICAL
No i
Critical
Not published

MAL-2026-832: Malicious code in chai-as-approved (npm). Affected versions are not published. No fix is published. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The chai-as-approved package is a JavaScript library used in Node.js applications for testing and assertions. It is designed to enhance the capabilities of the Chai assertion library, allowing developers to write more expressive tests. However, this package has been found to contain malicious code that compromises the security of systems where it is installed.

Vulnerability Detail

The vulnerability originates from the inclusion of malicious code within the chai-as-approved package. This code can fully compromise any computer that has the package installed, leading to potential data breaches and unauthorized access to sensitive information. The malicious code can manipulate system operations, making it difficult to remove all traces of the compromise even after the package is uninstalled. Users are advised to treat any system with this package as fully compromised.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall chai-as-approved

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 workaround, ensure that you do not run any applications that depend on the chai-as-approved package until it has been removed. Additionally, consider using alternative packages that provide similar functionality without the associated risks.

Conclusion

The discovery of malicious code within the chai-as-approved package poses a serious threat to users and their systems. Immediate action is required to mitigate the risks associated with this vulnerability. Users should uninstall the package, rotate sensitive information, and consider using alternative libraries for their testing needs.

See every vulnerability recorded for chai-as-approved →

Share this vulnerability

FAQ

You should uninstall the package immediately and rotate any sensitive information stored on the affected system.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without requiring any signup.

While removing the package is crucial, there is no guarantee that all malicious software will be removed. It is recommended to perform a thorough security audit and consider reinstalling the operating system if necessary.

Leaving the package installed poses significant risks, including unauthorized access to sensitive data, potential data breaches, and complete control of your system by malicious actors.

Yes, consider using other assertion libraries that do not have known vulnerabilities, such as the standard Chai library or other well-reviewed testing frameworks.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall chai-as-approved

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback