chaienv (npm) · Malicious Code
Affects chaienvSource GCVE Database
Malicious package : remove chaienv and rotate any secrets on hosts that installed it.
Data as of 30 Sep 2026, 16:40 UTC
Malicious package
Published to npm · OSV MAL-2026-17321
What to do
Remove chaienv 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 |
|---|---|---|
| npmchaienv | 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 chaienv version 1.0.2 contains a large obfuscated JavaScript payload disguised as a small Chai environment helper. The package loads a 4.4MB single-line obfuscated module that does not match the advertised functionality and includes decoy files mimicking a legitimate project to evade casual inspection. Any user importing this package executes the opaque code, which poses a risk of malicious behavior.