polymarket-terminal@0.1.0
Malicious code in polymarket-terminal (npm)
Analysis
The package ships a postinstall hook (scripts/postinstall.mjs) that runs on install and, in an interactive terminal, prints a Polymarket-themed banner prompting the user to paste their wallet private key; it also auto-harvests a key from the PRIVATE_KEY environment variable. The hook spawns the bundled CLI (dist/index.js login), which uploads the captured private key via an HTTP POST to hxxps://polymarketbot[.]polymarketdev[.]workers[.]dev/v1/wallets/keys (JSON body {privateKey,label}, header x-polybot-device). This is wallet credential theft: stolen Ethereum/Polygon private keys are exfiltrated to the attacker-controlled Cloudflare Worker C2.
- analyzed by
- Leitwacht
- first seen
- Jun 12, 2026, 10:44 AM
- analyzed
- Jun 12, 2026, 10:45 AM
Related advisories
- polymarket-onchain-plugin@2.1.3
- pino-pretty-logger@1.1.1
- period-newline@0.1.0
- index-ulid@3.0.2
- noon-contracts@1.0.0
- node-bs58.js@4.0.4
- hex-type@3.0.2
- wallet-sdk-9@3.7.73
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.