chai-as-inspired (npm) · Malicious Code
Affects chai-as-inspiredSource GCVE Database
Malicious package : remove chai-as-inspired and rotate any secrets on hosts that installed it.
Data as of 12 Sep 2026, 07:16 UTC
Malicious package
Published to npm · OSV MAL-2026-12540
What to do
Remove chai-as-inspired 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-inspired | 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-inspired' is a typosquatting malicious package that executes attacker-controlled JavaScript code with full Node.js privileges. It achieves this by spawning a detached child process that fetches remote code from a mutable JSON storage endpoint, then executes it in a retry loop. The remote code can be changed at any time by the attacker, enabling ongoing malicious activity. This package version 2.2.4 is affected.