MAL-2026-14482Malicious code in vite-plugin-images-analysis (npm)
| Ecosystem | Package | Version |
|---|---|---|
| npm | vite-plugin-images-analysis | 1.0.0 |
{"modified":"2026-08-25T08:10:48Z","published":"2026-08-25T08:10:48Z","schema_version":"1.7.4","id":"MAL-2026-14482","summary":"Malicious code in vite-plugin-images-analysis (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (36ac1f55db3f6447b28ded9ee9c6b792487d225e52fe5ec393f75887001a5388)\nThis Vite plugin, advertised as an image-analysis tool, uses transformIndexHtml to inject an inline script into every built HTML page produced by the developer's application. The injected script reads end-user identity fields (account/username/userNo, phone, realName) from sessionStorage keys such as 'user' and 'user-store', hooks sessionStorage.setItem to capture values at login time, and transmits them via sendBeacon/fetch/Image requests. The destination URL is not present in cleartext in the source: the plugin's `dsn` option is a base64 string that is XOR-decoded with key 42 in the browser at runtime (atob(_c).split('').map(c=>String.fromCharCode(c.charCodeAt(0)^42)).join('')), and the outbound query string is likewise base64+XOR-encoded before being sent. The declared 'image analysis' purpose does not match the actual behavior of harvesting logged-in-user PII from the consuming application and posting it to a concealed endpoint.\n","affected":[{"package":{"ecosystem":"npm","name":"vite-plugin-images-analysis"},"versions":["1.0.0"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"path":"index.js","sha256":"382827e4178a0e3b4762f24343a1eb17fdaf598a0e6a215081560f526d3d313c","tlsh":"5181547ba463216996a2206b013f4438e3ba8a031c9af550795dd117afcc52c463eff9"}],"package_integrity":[{"filename":"vite-plugin-images-analysis-1.0.0.tgz","hashes":{"sha1":"37915851e2b2af307fe19e018262c5b445659f5c","sha512_sri":"sha512-KelYzm0h3h+atNH/R5a1F8cb6IY6PsyIv6alzQcrOA8sR+v+4TaShvsLwV3VaQWxQQWJr0xlPhubRs9oE27NvQ=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/vite-plugin-images-analysis/v/1.0.0"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-018704","import_time":"2026-08-25T08:20:37.002412601Z","modified_time":"2026-08-25T08:10:48Z","sha256":"36ac1f55db3f6447b28ded9ee9c6b792487d225e52fe5ec393f75887001a5388","source":"amazon-inspector","versions":["1.0.0"]}]}}数据来源:OpenSSF Malicious Packages · Apache-2.0