OpenSSF/OSV advisory MAL-2026-5906 confirms this npm version as malicious. 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,...
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in chai-plugin-kit (npm)
Details
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.
Decision reason
OSV/OpenSSF confirms chai-plugin-kit@5.8.1 as malicious package MAL-2026-5906. Malicious code in chai-plugin-kit (npm)