{"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=\u003eString.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","modified":"2026-08-25T23:50:02.961194933Z","published":"2026-08-25T08:10:48Z","database_specific":{"malicious-packages-origins":[{"sha256":"36ac1f55db3f6447b28ded9ee9c6b792487d225e52fe5ec393f75887001a5388","source":"amazon-inspector","versions":["1.0.0"],"id":"IN-MAL-2026-018704","import_time":"2026-08-25T08:20:37.002412601Z","modified_time":"2026-08-25T08:10:48Z"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/vite-plugin-images-analysis/v/1.0.0"}],"affected":[{"package":{"name":"vite-plugin-images-analysis","ecosystem":"npm","purl":"pkg:npm/vite-plugin-images-analysis"},"versions":["1.0.0"],"database_specific":{"cwes":[{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"}],"indicators":{"package_integrity":[{"filename":"vite-plugin-images-analysis-1.0.0.tgz","hashes":{"sha1":"37915851e2b2af307fe19e018262c5b445659f5c","sha512_sri":"sha512-KelYzm0h3h+atNH/R5a1F8cb6IY6PsyIv6alzQcrOA8sR+v+4TaShvsLwV3VaQWxQQWJr0xlPhubRs9oE27NvQ=="}}],"evidence_files":[{"sha256":"382827e4178a0e3b4762f24343a1eb17fdaf598a0e6a215081560f526d3d313c","tlsh":"5181547ba463216996a2206b013f4438e3ba8a031c9af550795dd117afcc52c463eff9","path":"index.js"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/vite-plugin-images-analysis/MAL-2026-14482.json"}}],"schema_version":"1.9.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}