Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Malicious code in vite-config-optimizer (npm)

0
Critical
Published: 06/13/2026 (06/13/2026, 03:03:44 UTC)
Source: GCVE Database
Product: vite-config-optimizer

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

npmghsa
vite-config-optimizer
Affected versions
=1.1.4

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

AILast updated: 07/15/2026, 12:53:17 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses