Malicious code in polymarket-stake-maths (npm)
Historical advisory saved 24 Oct 2026 13:17:17 UTC. The publisher may have updated it since then. Latest advisory.
osv · MAL-2026-6439
Published--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (657363aaa0b94385d30a26c1f4ee67923b0d877975850ad08f8364c2a901d8e7) 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. ## Source: ghsa-malware (a3d723981cca8603a3ddd36b39325326fbe25f5354dc29f2202fa4d8dd3b9d88) 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.
- Source published
- 25 Jun 2026 05:56:40 UTC
- Source modified
- 5 Aug 2026 06:36:23 UTC
- Saved here
- 24 Oct 2026 13:17:17 UTC
- Source terms
- OSV · upstream source license applies
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · OSV · upstream source license applies. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.