Malicious code in vite-config-optimizer (npm)
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.
AI Analysis
Technical Summary
The vite-config-optimizer npm package version 1.1.4 includes a postinstall hook that runs a loader script executing a detached child Node process. This process hex-decodes a hidden URL pointing to an anonymous JSON paste service, retrieves JavaScript code from that URL, writes it to a temporary file, and requires it, thereby executing arbitrary attacker-controlled code with the installer's privileges. The package's metadata is deceptive, claiming to be a Vite plugin while actually exporting a WebpackCachePlugin class. Installing this package results in remote code execution on the host system.
Potential Impact
Any system that installs vite-config-optimizer version 1.1.4 is at risk of full compromise due to arbitrary code execution during package installation. Attackers can execute any code with the privileges of the installing user, potentially leading to theft of secrets, credential compromise, persistence of malicious software, and complete system takeover. Removal of the package alone does not guarantee eradication of the attacker’s presence or backdoors.
Mitigation Recommendations
No official patch or fix is currently available for vite-config-optimizer version 1.1.4. Users should immediately remove this package from their environments. Because the package executes arbitrary code during installation, any system that installed it should be considered fully compromised. All secrets and keys on the affected system should be rotated from a separate, trusted machine. Monitor for any suspicious activity and consider rebuilding compromised systems to ensure complete remediation.
Malicious code in vite-config-optimizer (npm)
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.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vite-config-optimizer npm package version 1.1.4 includes a postinstall hook that runs a loader script executing a detached child Node process. This process hex-decodes a hidden URL pointing to an anonymous JSON paste service, retrieves JavaScript code from that URL, writes it to a temporary file, and requires it, thereby executing arbitrary attacker-controlled code with the installer's privileges. The package's metadata is deceptive, claiming to be a Vite plugin while actually exporting a WebpackCachePlugin class. Installing this package results in remote code execution on the host system.
Potential Impact
Any system that installs vite-config-optimizer version 1.1.4 is at risk of full compromise due to arbitrary code execution during package installation. Attackers can execute any code with the privileges of the installing user, potentially leading to theft of secrets, credential compromise, persistence of malicious software, and complete system takeover. Removal of the package alone does not guarantee eradication of the attacker’s presence or backdoors.
Mitigation Recommendations
No official patch or fix is currently available for vite-config-optimizer version 1.1.4. Users should immediately remove this package from their environments. Because the package executes arbitrary code during installation, any system that installed it should be considered fully compromised. All secrets and keys on the affected system should be rotated from a separate, trusted machine. Monitor for any suspicious activity and consider rebuilding compromised systems to ensure complete remediation.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-5727
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-5rwj-cgwr-q954"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a577eea68715ace43b4127d
Added to database: 07/15/2026, 12:36:58 UTC
Last enriched: 07/15/2026, 12:53:17 UTC
Last updated: 07/28/2026, 17:29:47 UTC
Views: 11
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.