{"id":"MAL-2026-6587","summary":"Malicious code in clob-client-math (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (b36bbf14a743630a93ba7f8d7529d3fae8073f0f585af4343506be6248fc1b59)\nclob-client-math@1.0.1 ships a postinstall script (install-check.cjs) that fetches a JSON config from https://polymarket-clob-service.vercel.app/config/clob-math.json, reads a `peerBundle` tarball URL from the response, downloads the tarball, extracts it with `tar -xzf`, runs `npm install` inside the extracted directory, then `require()`s `peer-math.js` and invokes `syncSession()`. The fetched content is unpinned and unverified (no hash, no signature), the destination is a free Vercel subdomain unrelated to Polymarket's actual publisher infrastructure, and the entire bundle is attacker-controlled at runtime. The package name `clob-client-math` mimics Polymarket's official `@polymarket/clob-client`, and the README self-identifies as `polymarket-stake-math` with an inflated 3.x changelog despite being published as 1.0.1 — a lure for developers searching for Polymarket helpers. Function names like `resolvePeerBundleUrl`, `peer-math.js`, and `syncSession` frame the remote-code-execution mechanism as a benign 'peer sync / install check' that the README never documents. Installing this package results in arbitrary attacker code executing on the installer's machine.\n","modified":"2026-07-09T16:31:55.592418464Z","published":"2026-06-29T07:18:45Z","database_specific":{"malicious-packages-origins":[{"versions":["1.0.0"],"source":"amazon-inspector","sha256":"9e5d9d8399e2b05081019def33eac48372a162c8c9a069c26d4225285ffe0a18","import_time":"2026-06-29T09:10:16.401767804Z","id":"IN-MAL-2026-007772","modified_time":"2026-06-29T07:18:45Z","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}]},{"modified_time":"2026-07-09T15:52:13Z","versions":["1.0.1"],"source":"amazon-inspector","sha256":"b36bbf14a743630a93ba7f8d7529d3fae8073f0f585af4343506be6248fc1b59","import_time":"2026-07-09T16:20:55.806422681Z","id":"IN-MAL-2026-009264"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/clob-client-math/v/1.0.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/clob-client-math/v/1.0.1"}],"affected":[{"package":{"name":"clob-client-math","ecosystem":"npm","purl":"pkg:npm/clob-client-math"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.0.0","1.0.1"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/clob-client-math/MAL-2026-6587.json","cwes":[{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"tlsh":"59a1459519a2727746b1ebb8c722901dfe2340233521c350f6de96952fb72a4c352dec","path":"scripts/install-check.cjs","sha256":"6802db59168709186a085f1bf6c162288ae0482d66a35816bda9f0704d0b709b"},{"path":"package.json","sha256":"a3b57758133cdecc7859745b67bed1e750b77205cc2d5aa01d26f96a4b699a2a","tlsh":"b2f0ac33da904e3228bc8f5d4e791504f4640b5f32b00d0b70bb610c8fb2573145b72a"}],"package_integrity":[{"filename":"clob-client-math-1.0.0.tgz","hashes":{"sha1":"28b4ba027a8a2ee47002709075d2de446067473d","sha512_sri":"sha512-7BXIsbFOCUyOMrQXeRIBKdP4xfqXToB79zV3/E0R1Tgaqvqr+DGJhM07CX3BWIe5t5EOVL4s2DpSNevFwldoRg=="}}]}}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}