{"id":"MAL-2026-10546","revision":"f2c41d2bb6f34ec59d898bb7d4707cc7","records":[{"revision":"f2c41d2bb6f34ec59d898bb7d4707cc7","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-10546","aliases":[],"title":"Malicious code in viteplugiin (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (5afbe0fab50b9582867bb208b6cfb20080849e27d27df79711f55e2db69f66bb)\nThe npm package 'viteplugiin' impersonates '@base44/viteplugin' via a one-character insertion (doubled 'i') and ships a hostile payload in dist/index.js, the entry resolved by the package's exports map. After the legitimate-looking plugin code, a large whitespace gap conceals an obfuscated stub that uses Fisher-Yates string shuffles with hardcoded seeds to reconstruct the identifiers 'require', '__dirname', '__filename', 'undefined', and 'constructor', reassigns require/__dirname/__filename onto the global object, obtains the Function constructor, and invokes it on two decoded string bodies — executing attacker-controlled JavaScript at module load time in the consumer's Vite build. Because Vite configs import plugins at config-evaluation time, adding this plugin to vite.config.* causes the payload to run on developer and CI machines during any Vite command. Provenance is consistent with an attack drop: empty author field, no repository/homepage, and package.json 'main' pointing at a nonexistent root index.js while the exports map silently routes '.' to the tampered dist/index.js. The README and internal resolveId targets reference the legitimate '@base44/vite-plugin' as cover.\n","state":0,"publishedAt":"2026-07-14T04:13:11+00:00","modifiedAt":"2026-07-14T04:46:59.0411407+00:00","affected":[{"ecosystem":"npm","name":"viteplugiin","ranges":[],"versions":["1.0.28"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/viteplugiin/v/1.0.28"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-10546","license":"OSV · upstream source license applies","key":"osv:MAL-2026-10546","identifiers":["MAL-2026-10546"]},"retained":false,"historicalAffected":[]}],"coverage":[]}