# MAL-2026-6439: Malicious code in polymarket-stake-maths (npm)


- **Type:** Malicious package
- **Package:** `polymarket-stake-maths` (npm)
- **Published:** 25 Jun 2026
- **Also known as:** GHSA-x384-v7hw-q48x

## What is MAL-2026-6439?

MAL-2026-6439 is a malicious package in polymarket-stake-maths, published on 25 Jun 2026. 

### Official description

On `npm install`, the package's postinstall script (scripts/install-check.cjs) fetches a JSON config from https://log-taker.store/config/stake-math-sync.json, reads a `peerBundle` URL from that config, downloads the referenced.tgz, extracts it into a `.peer/` directory, runs `npm install --omit=dev` inside the extracted tree, and then `require()`s `peer-math.js` and invokes `syncSession()`. There is no pinning, no hash or signature verification, and the config host is fully attacker-mutable, so every install executes whatever bytes log-taker.store is currently serving. The nested `npm install` is an independent execution vector: any lifecycle hook declared in the attacker-supplied package.json runs with the installer's privileges. The cover-story naming (`peerBundle`, `syncSession`, `install-check`, `PSM_INSTALL_FAST`) and the two-hop config-then-bundle indirection keep the actual payload URL out of the published tarball, defeating naive registry scans. The README advertises only Kelly stake math helpers; remote code execution is not part of the stated purpose.

Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.

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

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-6439 is a malicious package: polymarket-stake-maths (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-6439/ (Markdown: https://insights.sbomify.com/MAL-2026-6439/index.md)
```

## Sources

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

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