chai-chain-dom@1.3.7
Malicious code in chai-chain-dom (npm)
Analysis
On require(), the package spawns a detached background child process (index.js → lib/caller.js, detached:true, stdio:ignore). The background process fetches a remote payload from hxxps://jsonkeeper[.]com/b/BPB86 (with custom header x-secret-key: _) and executes it via new Function.constructor("require", src), giving the attacker-controlled response full Node.js require() access. The fetch retries up to 5 times on failure, silently. The package name is a combosquat on the real chai testing library, and the internal code is a trojanized copy of the pino logger. The remote endpoint (jsonkeeper[.]com/b/BPB86) can deliver arbitrary code at runtime — any payload from a system survey to credential theft.
- analyzed by
- Leitwacht
- first seen
- Jul 2, 2026, 07:07 PM
- analyzed
- Jul 2, 2026, 07:08 PM
Related advisories
- better-tailwindcss@4.6.3
- transform-es2015-sticky-regex@6.24.3
- chai-await-dom@1.3.7
- chai-as-align@7.1.0
- db-query-log@1.0.2
- marked-prettier@1.0.5
- execfences@5.0.2
- react-jsonwebtoken@9.0.5
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.