vite-plugin-image-trackernpm
Advisory published Updated
vite-plugin-image-tracker is a confirmed malicious npm package (MAL-2026-14481) that steals credentials and exfiltrates sensitive data (malicious versions 1.0.0, 1.1.0). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in vite-plugin-image-tracker (npm)
What this malware does
The package presents itself as a Vite image-tracking plugin. At build time its transformIndexHtml hook injects a script into every produced HTML page. In the end-user's browser that script reads user objects from sessionStorage and extracts account/username/userNo, phone number, and real name (i.phone, i.realName, i.account), builds a u=...&a=...&p=...&n=... payload, XOR-42 + base64 encodes it, and transmits it via sendBeacon, fetch, or an Image request. The reporting endpoint is not a plain URL: the plugin accepts options.dsn only as a base64+XOR(42) ciphertext (var _rawDsn=atob(_c).split("").map(function(c){return String.fromCharCode(c.charCodeAt(0)^42)}).join("");), and the injected browser script performs the same decode at runtime to reconstruct the destination. The package name and description ('image tracker') do not disclose collection of end-user personal data, and the destination is concealed from developers reading the plugin configuration or the built HTML. The obfuscation of the endpoint together with the specific PII fields harvested places this outside the shape of a legitimate telemetry SDK.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Credential / info stealerFind it
Search your lockfiles and build artifacts for vite-plugin-image-tracker (2 malicious versions).
If you installed it — respond
vite-plugin-image-tracker is built to steal secrets, so assume every credential the build or runtime could read is compromised. Remove it from your project and lockfile, then rotate ALL exposed secrets — npm/registry tokens, cloud keys, CI/CD secrets, SSH keys, and any .env values — from a known-clean machine. Audit logs for unauthorized use of those credentials.
Did it already run?
If vite-plugin-image-tracker was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks vite-plugin-image-tracker-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the credential exfiltration and severs the channel.