Skip to main content
MalwarePublished

chai-as-smart (npm) · Malicious Code

Affects chai-as-smartSource GCVE Database

0

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

Data as of 10 Jul 2026, 10:22 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-10046

What to do

Remove chai-as-smart 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-smartAffected
  • =2.3.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-smart version 2.3.5 contains malicious code that executes upon requiring the package. It spawns a detached background process that decodes a hidden URL and sends the full environment variables of the host process to a remote attacker-controlled endpoint. The response from this endpoint is executed as code with full access to Node.js require, enabling arbitrary code execution. This behavior exposes sensitive information such as tokens, cloud credentials, and CI secrets, and allows full remote code execution on the affected machine.

References

Community reviews

Loading reviews…