stake-math (npm) · Malicious Code
Affects stake-mathSource GCVE Database
Malicious package : remove stake-math and rotate any secrets on hosts that installed it.
Data as of 30 Jul 2026, 09:20 UTC
Malicious package
Published to npm · OSV MAL-2026-6585
What to do
Remove stake-math from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmstake-math | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
The npm package 'stake-math' versions 3.5.2, 3.5.3, and 3.5.4 contains malicious code that executes arbitrary attacker-controlled commands during installation. The package's postinstall script fetches and runs code from an untrusted external source unrelated to the legitimate publisher, leading to full system compromise. The package also impersonates another brand to deceive users. Systems with this package installed should be considered fully compromised, and secrets must be rotated immediately.
References
- npmjs.com/package/stake-math/v/3.5.2 (opens in a new tab)
- npmjs.com/package/stake-math/v/3.5.3 (opens in a new tab)
- npmjs.com/package/stake-math/v/3.5.4 (opens in a new tab)
- npmjs.com/package/stake-math/v/3.3.0 (opens in a new tab)
- npmjs.com/package/stake-math/v/3.2.0 (opens in a new tab)
- npmjs.com/package/stake-math/v/3.1.0 (opens in a new tab)
- npmjs.com/package/stake-math/v/3.5.5 (opens in a new tab)
- github.com/advisories/GHSA-qcc9-j6wh-4h9h (opens in a new tab)