Skip to main content

Malicious code in vite-plugin-crypto (npm)

0
Critical
Published: 09/28/2026 (09/28/2026, 16:03:22 UTC)
Source: GCVE Database
Product: vite-plugin-crypto

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.

Affected software

npmghsa
vite-plugin-crypto
Affected versions
=1.0.2=1.0.6=1.0.5

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: 09/29/2026, 04:57:52 UTC

Technical Analysis

[email protected], 1.0.5, and 1.0.6 expose a Vite plugin factory that concatenates three option fields (`secret`, `salt`, and `iv`) into a string passed to SystemJS's dynamic import function. This string is treated as a module specifier, causing arbitrary JavaScript code execution on the Vite build or development host each time the plugin config is loaded. The malicious code is disguised as a cryptographic key derivation step, but only `secret` is used in the actual AES-GCM encryption path, while `salt` and `iv` are unused. The promise returned by SystemJS import is discarded, hiding the malicious dynamic loading. This leads to full compromise of any computer running the affected package versions.

Potential Impact

Any system with vite-plugin-crypto versions 1.0.2, 1.0.5, or 1.0.6 installed or running is fully compromised. Attackers gain arbitrary code execution on the host during Vite build or dev processes, potentially exposing all secrets and keys stored on the machine. Immediate secret and key rotation is required from a clean environment. Removing the package alone does not guarantee removal of all malicious artifacts or backdoors.

Mitigation Recommendations

No official patch or fix is currently documented. The package should be removed immediately from all affected systems. All secrets and keys stored on compromised machines must be rotated from a separate, trusted environment. Due to the nature of the compromise, assume full system control by an attacker and perform comprehensive incident response and system rebuilds as necessary. Monitor for any updates or advisories from the package maintainers or security vendors for 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-17222
Osv Schema Version
1.7.4
Aliases
["GHSA-mh9w-qr45-6wrq"]
Ecosystems
["npm"]

Threat ID: 6abb41a5f7a7c54106cc3916

Added to database: 09/29/2026, 04:42:13 UTC

Last enriched: 09/29/2026, 04:57:52 UTC

Last updated: 09/29/2026, 18:00:21 UTC

Views: 14

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