Malicious Code Vulnerability in chai-proxy: A Threat to npm Users

chai-proxy Updated 19 Mar 2026

Summary

18/03/2026
CRITICAL
No i
Critical
Not published

MAL-2026-1684: Malicious code in chai-proxy (npm). Affects chai-proxy versions 2.4.2 – 2.4.3. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

chai-proxy is an npm package that facilitates the creation of proxy servers for testing and development purposes. It allows developers to intercept and modify HTTP requests and responses, making it a valuable tool for debugging and testing web applications. However, recent findings have revealed that certain versions of chai-proxy contain malicious code, posing significant security risks to users who rely on this package.

Vulnerability Detail

The vulnerability in chai-proxy arises from the inclusion of malicious code in versions 2.4.2 and 2.4.3. This code can potentially compromise the security of applications using the package, leading to unauthorized access, data breaches, or other malicious activities. The origin of this vulnerability is linked to a malicious actor who has injected harmful code into the package, which can execute without the user's knowledge, thus posing a severe threat to application integrity.

How To Fix

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

npm uninstall chai-proxy

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, users can avoid using the affected versions (2.4.2 and 2.4.3) of chai-proxy until they have updated to a secure version. Additionally, users can implement alternative proxy solutions or manually handle HTTP requests without relying on chai-proxy.

Conclusion

The discovery of malicious code in the chai-proxy package highlights the importance of maintaining vigilance when using open-source software. Users are strongly advised to update to the latest version of the package to mitigate any potential risks associated with this vulnerability. Utilizing tools like Vulert can further enhance security by providing real-time alerts for vulnerabilities in your software.

See every vulnerability recorded for chai-proxy →

Share this vulnerability

FAQ

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without any signup.

If immediate updates are not possible, consider using alternative proxy solutions or refrain from using the affected versions until a secure version is available.

Using the affected versions can lead to unauthorized access, data breaches, and other malicious activities that compromise application security.

The vulnerability was identified by ReversingLabs, a cybersecurity firm specializing in threat detection.

How To Fix

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

npm uninstall chai-proxy

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