chai-foundry (npm) · Malicious Code
Affects chai-foundrySource GCVE Database
Malicious package : remove chai-foundry and rotate any secrets on hosts that installed it.
Data as of 26 Oct 2026, 16:15 UTC
Malicious package
Published to npm · OSV MAL-2026-13356
What to do
Remove chai-foundry 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-foundry | 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-foundry version 7.0.2 and 7.0.3 is identified as a trojanized malicious package masquerading as a chai plugin. It impersonates legitimate software by copying metadata from the pino logger and includes a heavily obfuscated multi-megabyte payload that executes immediately upon requiring the package. This payload hides its network endpoints and behavior, indicating it is a hostile dropper and stealer. Systems with this package installed should be considered fully compromised, and secrets and keys must be rotated from a separate, clean system.
References
- npmjs.com/package/chai-foundry/v/7.0.3 (opens in a new tab)
- npmjs.com/package/chai-foundry/v/7.0.2 (opens in a new tab)
- github.com/advisories/GHSA-x29h-74hf-jq7x (opens in a new tab)
- github.com/advisories/GHSA-6ffq-phjp-69jj (opens in a new tab)
- security.snyk.io/vuln/SNYK-JS-BIGOPSRXPOSTMESSAGE-18551079 (opens in a new tab)