Skip to main content
MalwarePublished

chai-secure (npm) · Malicious Code

Affects chai-secureSource GCVE Database

0

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

Data as of 10 Jul 2026, 10:11 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-10053

What to do

Remove chai-secure 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-secureAffected
  • =1.2.3
  • =1.2.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-secure versions 1.2.3 and 1.2.5 contains malicious code that executes attacker-controlled JavaScript on the host machine. Upon import, it silently spawns a detached Node.js child process that fetches code from a remote HTTP server and executes it with full privileges. This behavior is hidden from the README and uses evasion techniques such as delivering payload via a 404 response. The package masquerades as a Chai plugin providing assertion helpers but instead performs unauthorized remote code execution.

References

Community reviews

Loading reviews…