chai-leaf (npm) · Malicious Code
Affects chai-leafSource GCVE Database
Malicious package : remove chai-leaf and rotate any secrets on hosts that installed it.
Data as of 26 Oct 2026, 16:18 UTC
Malicious package
Published to npm · OSV MAL-2026-10940
What to do
Remove chai-leaf 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-leaf | 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-leaf versions 1.4.5, 1.4.6, 1.4.7, and 1.4.8 contains a malicious obfuscated JavaScript file that executes immediately upon import. This file is designed to steal credentials from common installer directories such as ~/.ssh and ~/.aws and exfiltrate them via HTTP. The package misrepresents itself with inconsistent documentation and mimics legitimate packages to evade detection. Any system with this package installed should be considered fully compromised, and all secrets should be rotated immediately from a secure environment.