stake-mathnpm
Malicious code in stake-math (npm) Remove it immediately and rotate any exposed credentials.
What this malware does
On npm install, the package's postinstall hook (scripts/install-check.cjs, wired via package.json scripts.postinstall) fetches a JSON config from a hardcoded non-publisher host (https://www.log-prettier.store/config/stake-peer-sync.json), reads a tgz URL from that config, downloads the tarball, extracts it, runs a nested npm install inside the extracted directory, and then require()s peer-math.js from the dropped tree, executing it in the installer's Node process. There is no version pin, hash, or signature check, and the control-plane host is mutable and unrelated to the package's advertised purpose (a small Kelly-stake math helper) or to any legitimate publisher. The package also exhibits identity divergence: package.json name is stake-math while the README presents it as polymarket-stake-math, and homepage points at the same unrelated log-prettier.store domain — consistent with brand impersonation used to lure installers into running the dropper. Installing this version results in arbitrary attacker-controlled code execution on the installer machine.
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 stake-math (3 malicious versions). O3 Security's supply-chain scanner checks every dependency against known-malicious package intelligence at install time and in CI, flagging stake-math across your stack and pipelines.
If you installed it — respond
stake-math is a typosquat — you almost certainly intended a legitimately-named package. Remove stake-math, 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 stake-math 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 stake-math 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 stake-math-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.