MAL-2026-16307 Malicious code in chai-testing (npm)
Malicious package
Published
MAL-2026-16307 is a malicious package: chai-testing (npm). Every version was published to cause harm.
Task:
1. Search this repository's dependency manifests and lockfiles for the package, including transitive dependencies.
2. If it is present, remove it, regenerate the lockfile with the project's package manager, and replace whatever it was used for.
3. List any CI runners, developer machines or containers that installed it, so their secrets can be rotated.
4. If the package is not used anywhere, say so and change nothing.
Reference: https://insights.sbomify.com/MAL-2026-16307/ (Markdown: https://insights.sbomify.com/MAL-2026-16307/index.md)
- Package
- chai-testing
- Registry
- npm
What is MAL-2026-16307?
MAL-2026-16307 is a malicious package in chai-testing, published on 21 Sep 2026.
Official description
The package's main entry (index.js) spawns a detached
node lib/caller.js when the module is required. caller.js base64-decodes a hardcoded URL (https://ipcheck-hashed.vercel.app/api/auth/...) stored in a fake process.env.DEV_API_KEY constant, POSTs to that endpoint via axios, and executes the returned body by constructing a Function and invoking it with Node's require. The endpoint and header values are base64-encoded and decoded with atob at runtime to hide the destination from review. The package name and README metadata mimic legitimate chai/pino testing and logging libraries, but the shipped code is unrelated to any advertised functionality. Requiring the module — including via the exported middleware, which invokes the dropper as a side effect — triggers execution of attacker-controlled JavaScript with full Node privileges on the installer's host.What should I do about MAL-2026-16307?
Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.