{"id":"MAL-2026-4790","summary":"Malicious code in makecoder (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (bf72d8ec7b803169421eb83d7ccbbdcd0af3671592775e25df2f92b33dfde5a4)\nscripts/postinstall.js runs automatically on `npm install`. When `bun` is not already present, it unconditionally executes `curl -fsSL https://bun.sh/install | bash` on Unix or `powershell -Command \"irm bun.sh/install.ps1 | iex\"` on Windows — fetching an unpinned, unhashed shell script over the network and piping it directly to a shell interpreter. The resulting Bun runtime is then used to launch a multi-megabyte bundled sibling (`dist/\u003cplatform\u003e/cc.js`) via the package's `_launchWithBun` / `_resolveBunPath` paths. This is the alternate-runtime-dropper shape: any compromise or MITM of the install endpoint yields arbitrary code execution on the installer's machine, and the install script's footprint includes writing to `~/.bun` and mutating shell RC files (`~/.bashrc`, `~/.zshrc`) to extend PATH. Separately, the postinstall recursively copies the package's bundled `claude/` directory into `~/.claude` with force-overwrite, silently clobbering any existing Anthropic Claude Code CLI configuration the installer has set up. Network destinations referenced from the bundled code include `geminicli.com`, and several modules wrap `child_process` together with HTTP POST/fetch primitives, but the primary install-time risk is the unverified pipe-to-shell of a remote runtime installer.\n","modified":"2026-05-27T00:32:04.189339135Z","published":"2026-05-26T09:10:24Z","withdrawn":"2026-05-26T18:46:32Z","database_specific":{"malicious-packages-origins":[{"import_time":"2026-05-26T09:17:33.495846135Z","id":"IN-MAL-2026-004882","modified_time":"2026-05-26T09:10:25Z","versions":["4.0.54"],"source":"amazon-inspector","sha256":"b5b4ff6dc5ba7cd7d01c3861db306cb66a304c0b08d82ce574c4823e54aed313"},{"versions":["4.0.54"],"source":"amazon-inspector","sha256":"e0137a523475bcb007059cff32df9ab8c2d8facb91e0d4d6326189e51c6b7b2b","import_time":"2026-05-26T09:17:33.410968891Z","id":"IN-MAL-2026-004881","modified_time":"2026-05-26T09:10:24Z"},{"modified_time":"2026-05-26T09:53:20Z","versions":["4.0.57"],"source":"amazon-inspector","sha256":"3bc499b7c33bc485d7f0546ff633fd057e3d0c18d0c56c3ed90093740f94f4a7","import_time":"2026-05-26T13:32:45.69800628Z","id":"IN-MAL-2026-004891"},{"modified_time":"2026-05-26T09:52:42Z","versions":["4.0.56"],"source":"amazon-inspector","sha256":"a6421705abbacb938518e92842923b02752567f48d038a1e5901abe2373da197","import_time":"2026-05-26T13:32:45.619946623Z","id":"IN-MAL-2026-004890"},{"id":"IN-MAL-2026-004889","modified_time":"2026-05-26T09:52:41Z","versions":["4.0.56"],"source":"amazon-inspector","sha256":"bf72d8ec7b803169421eb83d7ccbbdcd0af3671592775e25df2f92b33dfde5a4","import_time":"2026-05-26T13:32:45.571811181Z"},{"source":"amazon-inspector","sha256":"c7252876263364809addb6164e78b4c190202a2a1b40554cd4b3a45d181e857a","import_time":"2026-05-26T13:32:45.74833145Z","id":"IN-MAL-2026-004892","modified_time":"2026-05-26T09:53:20Z","versions":["4.0.57"]}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/makecoder/v/4.0.54"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/makecoder/v/4.0.57"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/makecoder/v/4.0.56"}],"affected":[{"package":{"name":"makecoder","ecosystem":"npm","purl":"pkg:npm/makecoder"},"versions":["4.0.54","4.0.57","4.0.56"],"database_specific":{"indicators":{"package_integrity":[{"filename":"makecoder-4.0.54.tgz","hashes":{"sha512_sri":"sha512-Qy4Fht90oI9D2wwr0/6IY9DJge/CECfnrjWmVwx0ippTVSh/n0Opga4S+AmQOG+oxvwmDcLF+O2xVtAppUCCQQ==","sha1":"f69aef2d3ff857ebac7562369be8ae8343308839"}}],"domains":["bun.sh"],"evidence_files":[{"path":"scripts/postinstall.js","sha256":"5db452cd7bac87b46b118485d8555ec7dbc3e3e9ef44bef0d1b71818ba9f351a","tlsh":"8a61f18a02f733326d6365ed2f8b045b229680532214ed1cbadd87c57f411348ae2bfd"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/withdrawn/npm/makecoder/MAL-2026-4790.json","cwes":[{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."},{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}]}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["actran@amazon.com"],"type":"FINDER"}]}