chai-as-map (npm) · Malicious Code
Affects chai-as-mapSource GCVE Database
Malicious package : remove chai-as-map and rotate any secrets on hosts that installed it.
Data as of 10 Aug 2026, 15:53 UTC
Malicious package
Published to npm · OSV MAL-2026-13702
What to do
Remove chai-as-map 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-map | 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-map' version 2.3.5 is identified as malicious. It masquerades as a chai-related utility but contains a large obfuscated payload executed at import time. The package bundles source code from the pino logger but exports only a no-op Express middleware. The obfuscated code includes a multi-megabyte hex string array with complex decoding, suggesting a stealer or loader functionality delivered via typosquatting and name confusion. The package also declares an unnecessary axios dependency, likely to reconstruct a remote destination at runtime. No CVSS score is available for this threat.