vite-plugin-crypto (npm) · Malicious Code
Affects vite-plugin-cryptoSource GCVE Database
Malicious package : remove vite-plugin-crypto and rotate any secrets on hosts that installed it.
Data as of 26 Oct 2026, 16:22 UTC
Malicious package
Published to npm · OSV MAL-2026-17222
What to do
Remove vite-plugin-crypto 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 |
|---|---|---|
| npmvite-plugin-crypto | 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 vite-plugin-crypto versions 1.0.2, 1.0.5, and 1.0.6 contains malicious code that enables arbitrary JavaScript execution on the host running Vite build or dev processes. This occurs because the plugin concatenates user-controllable option fields and passes them to SystemJS's dynamic module loader, allowing an attacker to execute arbitrary code during plugin construction. The package disguises this behavior as a benign cryptographic operation, but it effectively compromises any system where it is installed.
References
- github.com/advisories/GHSA-mh9w-qr45-6wrq (opens in a new tab)
- npmjs.com/package/vite-plugin-crypto/v/1.0.2 (opens in a new tab)
- npmjs.com/package/vite-plugin-crypto/v/1.0.6 (opens in a new tab)
- npmjs.com/package/vite-plugin-crypto/v/1.0.5 (opens in a new tab)
- npmjs.com/package/vite-plugin-crypto/v/1.0.1 (opens in a new tab)
- npmjs.com/package/vite-plugin-crypto/v/1.0.0 (opens in a new tab)