MAL-2026-5906 Malicious code in chai-plugin-kit (npm)
Malicious package
Published
MAL-2026-5906 is a malicious package: chai-plugin-kit (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-5906/ (Markdown: https://insights.sbomify.com/MAL-2026-5906/index.md)
- Package
- chai-plugin-kit
- Registry
- npm
What is MAL-2026-5906?
MAL-2026-5906 is a malicious package in chai-plugin-kit, published on 16 Jun 2026.
Official description
Package republishes the chai source tree under the confusable name
chai-plugin-kit. The package's main entry (index.js) spawns a detached, stdio-silenced node subprocess running lib/chai/utils/addAssertion.js on every require('chai-plugin-kit'). That file is heavily obfuscated with obfuscator.io transforms (rotated 31-entry string array _0x4a30, custom base64 decoder _0x495d, hex-named identifiers, control-flow flattening) hiding an https GET to an attacker-controlled URL whose response body is passed to new Function('require', body) and immediately invoked with the real require — granting attacker-controlled JavaScript full Node API access (filesystem, network, child_process, env). The detached + unref + stdio:'ignore' pattern is deliberate evasion to hide the child process from the consuming developer. A legitimate chai plugin has no reason to fetch and eval remote code.What should I do about MAL-2026-5906?
Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.