clob-client-math@1.0.1
Malicious code in clob-client-math (npm)
Analysis
On npm install, the postinstall hook (scripts/install-check.cjs) silently executes a multi-stage remote code loader while the package presents itself as a legitimate Polymarket Kelly-staking library. The hook resolves a second-stage tarball URL by fetching a JSON config from the package.json homepage field (polymarket-clob-service[.]vercel[.]app/config/clob-math.json) or from the environment variables PSM_PEER_URL, PSM_SYNC_CONFIG, or KELLY_PEER_CONFIG. It downloads the tarball via HTTP into a temp directory, extracts it, runs npm install on its dependencies, and executes the unpacked peer-math.js by calling its syncSession() function — giving the attacker full remote code execution on the installer's machine.
- analyzed by
- Leitwacht
- first seen
- Jun 29, 2026, 11:28 AM
- analyzed
- Jun 29, 2026, 11:29 AM
Related advisories
- hardhat-plugin-solidity@2.3.1
- authsessionbridge@1.6.29
- zyncmap@0.0.0
- ts-lint-builders-v2.1@2.1.0
- @withoneltd/lucky@0.1.4
- lessload@1.0.1
- express-mocha-test@0.0.1
- date-uuid@1.0.1
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.