chai-promised-test (npm) · Malicious Code
Affects chai-promised-testSource GCVE Database
Malicious package : remove chai-promised-test and rotate any secrets on hosts that installed it.
Data as of 10 Jul 2026, 10:18 UTC
Malicious package
Published to npm · OSV MAL-2026-10052
What to do
Remove chai-promised-test 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-promised-test | 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-promised-test' version 1.3.5 is a malicious package masquerading as the legitimate 'chai-as-promised' plugin and 'pino' logger. Upon use, it spawns a detached Node.js process that fetches and executes attacker-controlled code from a remote URL with full Node.js privileges, enabling arbitrary code execution on the installer's machine. The package conceals its command-and-control communication by shadowing process object fields and encoding headers, making detection more difficult. This package is designed to be installed by mistake due to its similarity to popular packages.