chai-as-format (npm) · Malicious Code
Affects chai-as-formatSource GCVE Database
Malicious package : remove chai-as-format and rotate any secrets on hosts that installed it.
Data as of 10 Aug 2026, 15:48 UTC
Malicious package
Published to npm · OSV MAL-2026-13701
What to do
Remove chai-as-format 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-format | 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-format' version 2.3.5 contains malicious code disguised as a configuration module. Its main file loads a heavily obfuscated, multi-megabyte decoder that executes on every import, acting as a trojan loader. The package falsely claims to be related to vulnerability management but includes copied content from an unrelated logging framework, indicating impersonation and deception.