Skip to main content
MalwarePublished Updated

chai-as-indexed (npm) · Malicious Code

Affects chai-as-indexedSource GCVE Database

0

Malicious package : remove chai-as-indexed and rotate any secrets on hosts that installed it.

Data as of 26 Oct 2026, 16:20 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-16293

What to do

Remove chai-as-indexed 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

ProductAffectedFixed in
npmchai-as-indexedAffected
  • =7.2.8
  • =6.0.5
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-indexed' version 7.2.8 contains malicious code that exfiltrates the full environment variables of the installer's Node.js process to a remote server. The package's main entry point loads a module that sends process.env data to a base64-encoded URL, then executes arbitrary code returned from that server in the importing process context. This behavior allows remote code execution on every load of the package. The package masquerades as a legitimate chai plugin, and the command-and-control server URL is obfuscated using base64 encoding to evade detection.

References

Community reviews

Loading reviews…