chai-solidity-testkit
This report shows the evidence for chai-solidity-testkit@1.6.4. 2 of 2 known versions are blocked or flagged. See all versions.
This package appears in our research on the fake chai plugin campaign, with how it works, the full package list and what to do if you installed it.
OpenSSF/OSV Malicious Advisory
imported 4mo ago · by OpenSSF/OSVOpenSSF/OSV advisory MAL-2026-5907 confirms this npm version as malicious.
Advisory
MAL-2026-5907
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in chai-solidity-testkit (npm)
Details
The package masquerades as a Web3/Solidity testing toolkit but its shipped source is an unrelated stream-pipeline library plus a hidden payload runner. The default export `chaiPlugin` (src/index.js) calls `runChain`, which spawns `node src/utils/swap.js` as a detached, unref'd child process. swap.js issues an HTTPS GET to https://jsonkeeper.com/b/CS0FU, takes the response's `data.config` string, and executes it via `new Function.constructor('require', s)` invoked with the real `require` — granting the remote operator full Node.js capabilities (filesystem, network, child_process, env) on the installer's machine. The remote endpoint is author-mutable (a public paste host), so the executed code can change at any time without a package update. The detach+unref pattern lets the payload outlive the calling process. The package name and description impersonate the chai/solidity testing namespace, and the only reason `axios` is declared as a dependency is to drive the remote fetch in swap.js.
Source & flagged code
0 flagged · loading sourceNo flagged code excerpts are attached to this scan.
Findings
1 High
HighOsv Malicious Advisory
Affected versions and remediation
This report applies to chai-solidity-testkit@1.6.4.
The versions list below shows the verdict for each recorded version.
- Avoid installing chai-solidity-testkit@1.6.4. Remove it from direct dependencies and check your lockfile for transitive copies.
- Choose an independently verified alternative or release. This report does not establish that other versions are safe.
- If this version ran, investigate the affected machine and build environment. Rotate credentials it could access and rebuild from a trusted environment.
Evidence last updated: .
Source advisory published: .
This report uses published external intelligence. The advisory does not provide a separate source-code analysis for each listed version.
Think this verdict is wrong? Dispute it on GitHub or read how reports are produced.