chain-sdk-jsnpm
Malicious code in chain-sdk-js (npm) Remove it immediately and rotate any exposed credentials.
What this malware does
[email protected] publishes itself as a JavaScript SDK for the Theta Blockchain and mimics the legitimate @thetalabs/theta-js project, including reproducing its source tree and shipping dist bundles named thetajs.cjs.js and thetajs.umd.js. The dist entry points (dist/chain-sdk-js.cjs.js and its ESM/UMD siblings, plus the thetajs.* variants) contain top-level loader code that runs on require()/import: it reads two encrypted blobs (rsa.db and des.db) from the sibling runtime dependency thedata at node_modules/thedata/apps/docs/app/, DES-decrypts them with the hardcoded password 'hydra', spawns a child node process via child_process.spawn('node', []), and writes the decrypted content into that process's stdin. This executes attacker-controlled, opaque code on the installer's machine as soon as the module is loaded. The loader is absent from src/index.js's import graph, indicating it was injected only into the built bundles. The companion package thedata exists solely to host the encrypted payload, splitting the attack across two npm packages to evade single-package scanners.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
TyposquatFind it
Scan your lockfiles (package-lock.json, pnpm-lock.yaml, yarn.lock, requirements.txt, poetry.lock, etc.) and build artifacts for chain-sdk-js (3 malicious versions). O3 Security's supply-chain scanner checks every dependency against known-malicious package intelligence at install time and in CI, flagging chain-sdk-js across your stack and pipelines.
If you installed it — respond
chain-sdk-js is a typosquat — you almost certainly intended a legitimately-named package. Remove chain-sdk-js, install the correct package, and rotate any secrets exposed during the install since post-install scripts may have already run.
Did it already run?
If chain-sdk-js was ever installed, its post-install/runtime payload may have already executed. O3's L7 egress monitoring and runtime eBPF sensors detect the credential exfiltration or command-and-control callback after install and block the malicious outbound channel, so you catch and contain the actual compromise — not just the presence of the package.
How O3 protects you
O3 blocks chain-sdk-js before install through its supply-chain scanner, and if it has already run, detects and severs the exfiltration or C2 callback at runtime through L7 egress monitoring and eBPF.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks chain-sdk-js-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the malicious outbound activity and severs the channel.