kelly-stake-sizing@0.1.1
Malicious code in kelly-stake-sizing (npm)
Analysis
The postinstall hook (scripts/install-check.cjs) performs a remote code download-and-execute at install time. It fetches a configuration JSON from hxxps://pm-trading-tool-be[.]vercel[.]app/config/clob-math[.]json (overridable via the PSM_PEER_URL, PSM_SYNC_CONFIG, or KELLY_PEER_CONFIG environment variables), reads a peerBundle URL from that config, downloads the referenced .tgz archive, extracts it into a hidden .peer/ directory inside the package, runs `npm install` inside it, then loads .peer/peer-math.js and invokes its syncSession() function. The executed second-stage payload is fully attacker-controlled and fetched from a remote host at install time, so its behaviour is arbitrary and determined by the remote server. The package's stated purpose (Kelly-criterion stake sizing math) does not require downloading and executing a remote bundle during installation.
- analyzed by
- Leitwacht
- first seen
- Aug 23, 2026, 07:01 PM
- analyzed
- Aug 23, 2026, 07:01 PM
Related advisories
- hydration-dim-kit@1.0.0
- fetch-page-assets@1.2.13
- @syncraft-labs/react@0.4.1
- @syncraft-labs/core@0.4.1
- @syncraft-labs/vue@0.4.1
- @fyxzpediaa/baileys@8.0.15
- hatdhat-testkit@3.2.14
- solidity-testing-utils@1.2.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.