chai-as-balanced (npm) · Malicious Code
Affects chai-as-balancedSource GCVE Database
Malicious package : remove chai-as-balanced and rotate any secrets on hosts that installed it.
Data as of 10 Jul 2026, 10:20 UTC
Malicious package
Published to npm · OSV MAL-2026-10040
What to do
Remove chai-as-balanced from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmchai-as-balanced | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
The npm package chai-as-balanced is a malicious typosquat of chai-as-promised that executes attacker-controlled code. It fetches a remote payload from an anonymous, mutable JSON storage service and executes it with full Node.js privileges, allowing arbitrary code execution. The malicious code runs in a detached child process, hiding its activity from the user. This threat affects version 2.2.3 of chai-as-balanced. There is no official patch or remediation guidance provided.