Skip to content
supplychainattack.orgSupply chain attack incident catalog
resolvedcritical

Malicious code in vite-vue-path-map (npm)

The npm package vite-vue-path-map contained malicious code that injected obfuscated JavaScript into production builds. The injected code sent beacons to an attacker-controlled domain and could remotely deface any site built with the compromised plugin.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
Any developer using vite-vue-path-map in their build pipeline; all end-users of applications built with affected versions
Ecosystems
Attack vectors
Affected entities
  • vite-vue-path-mapnpm package

The npm package vite-vue-path-map, advertised as a Vite plugin for generating local pathInfo.json maps, contained intentional malicious code in its generateBundle hook. The malicious behavior was hidden behind an undocumented MD5 license check comparing global variables 'gva-project-name' and 'gva-secret'.

When the license check failed, the plugin appended obfuscated JavaScript (stored as base64-encoded constants) to the largest/entry JavaScript chunk of the developer's production build. This injected code created an invisible 0x0 off-screen iframe on every page load, sending per-visitor beacons to https://plugin.gin-vue-admin.com/api/shopImage/view?name=logo.svg.

If the beacon request failed or returned a non-image response, the onerror handler would invoke document.open() and document.write() with a base64-decoded Chinese-language HTML page claiming "project unauthorized, contact WeChat shouzi_1994", completely replacing the developer's application in visitors' browsers. The injection, beacon, and defacement behavior were not documented in the README and could be remotely controlled by whoever controlled the attacker's domain, giving them a persistent remote switch to deface any site shipped with a build produced by this plugin.

Indicators of compromise

Packages
  • vite-vue-path-map
Domains
  • plugin.gin-vue-admin.com

Remediation

  • Remove vite-vue-path-map from all projects immediately
  • Audit all production builds created with this plugin for the presence of injected code
  • Rebuild and redeploy applications without the malicious plugin
  • Review build artifacts for base64-encoded constants (G, v, O) and invisible iframe injection patterns
  • Monitor for unexpected requests to plugin.gin-vue-admin.com in application logs
  • Consider using alternative, trusted Vite plugins for path mapping functionality

Sources

  1. GitHub Advisory GHSA-jvpq-f7f2-w263 · GitHub Advisory Database

Cite this entry

"Malicious code in vite-vue-path-map (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 7, 2026; last updated August 7, 2026. https://supplychainattack.org/incident/malicious-code-in-vite-vue-path-map-npm-1txdfg

Suggest a correction

Found an error or have a newer source? Corrections to factual errors take priority over new entries.

  1. resolvedcritical

    Malicious code in @lyxa.ai/core (npm)

    The npm package @lyxa.ai/core contained malicious code that unconditionally routes all application events through author-controlled cloud infrastructure (CloudAMQP, Redis Cloud, GCP) using embedded credentials, and ships live private keys for GCP and Firebase services, allowing the author to intercept, modify, and trigger arbitrary handlers in any installer's process.

    npmAI agents & skillsCompromised packageMalicious maintainer
  2. containedcritical

    Malicious code in opencode-optimised-toolings (npm)

    opencode-optimised-toolings@4.0.0 contains malicious code that downloads and builds an unauthorized opencode binary from a non-publisher GitHub repository, replaces the legitimate opencode executable on the user's PATH, and establishes persistent code execution with user privileges. The package modifies configuration files to ensure the malicious pipeline continues on future invocations.

    npmCompromised packageMalicious maintainer
  3. resolvedcritical

    Malicious code in blekit (npm)

    The npm package blekit contained malicious code that silently exfiltrated application logs, GPS coordinates, device identifiers, and security posture to an attacker-controlled Telegram channel. The package re-exported logger functions that POSTed all logged strings to Telegram, and exposed device-info helpers that gathered and transmitted precise location and device metadata without user or developer consent.

    npmCompromised packageMalicious maintainer
  4. containedcritical

    Malicious code in agenthub-ai (npm)

    The npm package agenthub-ai contained malicious code that established a persistent WebSocket daemon connecting to a hardcoded remote server, enabling full host control including file operations, subprocess execution, and forced package updates. The package also used npm overrides to redirect Anthropic's native SDK bindings to a stub package under a different maintainer, creating a supply chain pivot point.

    npmCompromised packageMalicious maintainer