Skip to main content
MalwarePublished

chai-as-byte (npm) · Malicious Code

Affects chai-as-byteSource GCVE Database

0

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

Data as of 15 Jul 2026, 12:58 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-10630

What to do

Remove chai-as-byte 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-byteAffected
  • =3.1.5
  • =3.1.6
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-byte versions 3.1.5 and 3.1.6 contains malicious code that, upon requiring the package, silently spawns a child process which exfiltrates the entire process environment variables to a remote server. The remote server then sends back code that is executed with full module access, enabling arbitrary code execution on the host. This exfiltration can leak sensitive information such as CI secrets, cloud tokens, and API keys. The package masquerades as part of the chai-as-* family but does not implement any legitimate functionality, instead performing this malicious activity without exposing any API.

References

Community reviews

Loading reviews…