Malicious code in vite-plugin-images-analysis (npm)
Description
The npm package vite-plugin-images-analysis, version 1.0.0, masquerades as an image analysis tool but injects malicious code into built HTML pages. This code harvests personally identifiable information (PII) such as account identifiers, phone numbers, and real names from sessionStorage. It captures data at login time by hooking sessionStorage.setItem and sends the collected information to a concealed endpoint using obfuscated base64 and XOR encoding.
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-plugin-images-analysis npm package (version 1.0.0) uses the Vite plugin hook transformIndexHtml to inject an inline script into every built HTML page. This script reads sensitive user identity fields (account/username/userNo, phone, realName) from sessionStorage keys like 'user' and 'user-store'. It also hooks into sessionStorage.setItem to capture these values when users log in. The harvested data is transmitted to a hidden remote server via sendBeacon, fetch, or Image requests. The destination URL is obfuscated using base64 encoding combined with XOR with key 42, decoded only at runtime in the browser. The plugin's declared purpose of image analysis does not align with its actual behavior of covertly exfiltrating logged-in user PII.
Potential Impact
This malicious package compromises user privacy by exfiltrating sensitive personally identifiable information from applications that include it. The data leakage includes account identifiers, phone numbers, and real names stored in sessionStorage, potentially exposing users to identity theft or targeted attacks. The obfuscation of the exfiltration endpoint complicates detection and mitigation.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should immediately remove vite-plugin-images-analysis version 1.0.0 from their projects and audit their applications for injected scripts. Avoid using this package and verify dependencies for similar malicious behavior. Monitor for updates or advisories from the package maintainers or npm registry regarding remediation.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-14482
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["npm"]
Threat ID: 6a8d9ae8acd9273b493e1795
Added to database: 08/25/2026, 13:38:48 UTC
Last enriched: 09/10/2026, 18:48:15 UTC
Last updated: 10/02/2026, 14:22:09 UTC
Views: 28
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.