Skip to main content
MalwarePublished Updated

vite-config-optimizer (npm) · Malicious Code

Affects vite-config-optimizerSource GCVE Database

0

Malicious package : remove vite-config-optimizer and rotate any secrets on hosts that installed it.

Data as of 15 Jul 2026, 12:53 UTC

Classification

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

ProductAffectedFixed in
npmvite-config-optimizerAffected
  • =1.1.4
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.

References

Community reviews

Loading reviews…