vite-config-optimizer (npm) · Malicious Code
Affects vite-config-optimizerSource GCVE Database
Malicious package : remove vite-config-optimizer and rotate any secrets on hosts that installed it.
Data as of 15 Jul 2026, 12:53 UTC
Malicious package
Published to npm · OSV MAL-2026-5727
What to do
Remove vite-config-optimizer 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-config-optimizer | 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-config-optimizer version 1.1.4 contains malicious code that executes arbitrary attacker-controlled JavaScript during installation. It uses a postinstall hook to run a loader script that fetches and executes code from a concealed remote URL, effectively giving an attacker full control over the installing system. The package masquerades as a Vite configuration plugin but actually exports a Webpack-related class and performs no legitimate install-time actions other than the malicious dropper. Systems with this package installed should be considered fully compromised.