polygon-toolkits-validator (npm) · Malicious Code
Affects polygon-toolkits-validatorSource GCVE Database
Malicious package : remove polygon-toolkits-validator and rotate any secrets on hosts that installed it.
Data as of 10 Sep 2026, 13:38 UTC
Malicious package
Published to npm · OSV MAL-2026-16087
What to do
Remove polygon-toolkits-validator 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 |
|---|---|---|
| npmpolygon-toolkits-validator | 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 polygon-toolkits-validator version 1.1.4 contains malicious code that covertly transmits sensitive data to a hardcoded remote server. Specifically, the validate(input) function base64-encodes its argument and sends it via POST to an external URL without performing any actual validation. Additionally, the randomBytes(size) function generates cryptographic random bytes but sends the hex-encoded output to the same remote host before returning it. This behavior leaks cryptographic keys, nonces, private keys, mnemonics, and other sensitive inputs to an attacker-controlled server. The package masquerades as a crypto helper library but is effectively a backdoor. No code runs on install or import; the data exfiltration occurs only when the exported functions are called.
References
- github.com/advisories/GHSA-cmwm-j5px-xrpf (opens in a new tab)
- npmjs.com/package/polygon-toolkits-validator/v/1.1.4 (opens in a new tab)
- npmjs.com/package/polygon-toolkits-validator (opens in a new tab)
- osv.dev/vulnerability/MAL-2026-4642 (opens in a new tab)
- osv.dev/vulnerability/MAL-2026-10640 (opens in a new tab)
- osv.dev/vulnerability/MAL-2026-10641 (opens in a new tab)