{"id":"MAL-2026-16331","summary":"Malicious code in element-plus-vite-cli (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (7b7636f89146191d649c38819e975fc41167a53276c66aea0b43789eb8d39338)\nOn load (main index.js → bin/cli.js), the package invokes tooling-bootstrap.cjs which walks up from the consumer project's cwd/INIT_CWD looking for one of nine hardcoded sentinel files characteristic of a fintech/trading application (e.g. src/api/AITrading.js, src/api/agentShot.ts, src/pages/ETF-quant-trading/history.vue, src/views/orderCenter/orderCenter.vue). When a match is found, the package concatenates ~85 base64 chunks embedded in the source, decodes them to an MJS agent, writes the agent to ~/.gradle-cache/tooling-api-runtime.mjs, and detach-spawns it under node with stdio ignored and windowsHide, tracked via a PID file — file/name choices (tooling-bootstrap, tooling-api-runtime.mjs,.gradle-cache, homeGradleDaemon) impersonate Gradle daemon infrastructure in a package that advertises itself as a Vite CLI for Vue 3 / Element Plus. The dropped agent registers to https://npmjs.it.com/api/register with os.hostname(), os.userInfo().username, and os.type()/os.release() plus a persistent UUID cached at ~/.gradle-cache/.aid, then long-polls /api/task/\u003cagent_id\u003e and executes attacker-supplied operations: exec (spawn cmd.exe /c or /bin/sh -c on attacker-supplied command strings), ls, download (exfiltrate arbitrary files to /api/file/...), upload (write base64 to arbitrary paths), delete (rm -rf), ps, and move, POSTing results to /api/result/\u003cagent_id\u003e. The agent also honors C2_TLS_INSECURE=1 to set NODE_TLS_REJECT_UNAUTHORIZED=0 and reads C2_SERVER_URL to override the hardcoded host npmjs.it.com (a typosquat lookalike for npmjs.com).\n","modified":"2026-09-21T04:00:07.596963693Z","published":"2026-09-21T03:30:48Z","database_specific":{"malicious-packages-origins":[{"sha256":"7b7636f89146191d649c38819e975fc41167a53276c66aea0b43789eb8d39338","source":"amazon-inspector","versions":["2.9.3"],"id":"IN-MAL-2026-020230","import_time":"2026-09-21T03:46:38.083413427Z","modified_time":"2026-09-21T03:30:48Z"},{"import_time":"2026-09-21T03:46:38.422838393Z","modified_time":"2026-09-21T03:31:23Z","sha256":"e8a11f32d24e5fd7b798af23c344d4dedde04b1acdfd5ae9bb8d02b3a9a53ff4","source":"amazon-inspector","versions":["2.9.5"],"id":"IN-MAL-2026-020234"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/element-plus-vite-cli/v/2.9.3"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/element-plus-vite-cli/v/2.9.5"}],"affected":[{"package":{"name":"element-plus-vite-cli","ecosystem":"npm","purl":"pkg:npm/element-plus-vite-cli"},"versions":["2.9.3","2.9.5"],"database_specific":{"indicators":{"evidence_files":[{"path":"tooling-bootstrap.cjs","sha256":"1d35407f044a7f0ff330906fa25b71cf8b1700a9e7d2c3fa837fb6583aa11ed7","tlsh":"316292a6cc9b2d448390461ab5ce19c9284e87872d827dddb7ee82dc6f4e42f01f51ed"}],"package_integrity":[{"filename":"element-plus-vite-cli-2.9.3.tgz","hashes":{"sha1":"8359f81f01a1981be8fc6de1928d7e797e5f6d21","sha512_sri":"sha512-zguqOuBqjoHA4aMnrpC3iY8iG1TE9b97m2VC/04F6wXFrW0Ca2OVXQjKEK+YM48ycVqwJrIlF7TTvIAaCbF6Ug=="}}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/element-plus-vite-cli/MAL-2026-16331.json","cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"}]}}],"schema_version":"1.9.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}