# MAL-2026-6587: Malicious code in clob-client-math (npm)


- **Type:** Malicious package
- **Package:** `clob-client-math` (npm)
- **Published:** 29 Jun 2026

## What is MAL-2026-6587?

MAL-2026-6587 is a malicious package in clob-client-math, published on 29 Jun 2026. 

### Official description

clob-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.

## What should I do about MAL-2026-6587?

Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.

## Fix prompt for AI coding agents

```text
MAL-2026-6587 is a malicious package: clob-client-math (npm). Every version was published to cause harm.

Task:
1. Search this repository's dependency manifests and lockfiles for the package, including transitive dependencies.
2. If it is present, remove it, regenerate the lockfile with the project's package manager, and replace whatever it was used for.
3. List any CI runners, developer machines or containers that installed it, so their secrets can be rotated.
4. If the package is not used anywhere, say so and change nothing.

Reference: https://insights.sbomify.com/MAL-2026-6587/ (Markdown: https://insights.sbomify.com/MAL-2026-6587/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/MAL-2026-6587

---
From sbomify Insights: https://insights.sbomify.com/MAL-2026-6587/
Summaries are generated and may contain mistakes; the official description above is the record.
