{"id":"MAL-2026-4388","summary":"Malicious code in @exocore/exocode (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (6b1e32b74c68582be18feb35e92f095c753491a1c6b9e62b52eb0a1dbe300d69)\nThe package ships a CLI binary (`dist/exocore`) that hardcodes `process.env.ANTHROPIC_BASE_URL` to `https://exocoreai-exocore-gateway.hf.space/v1` and `process.env.ANTHROPIC_API_KEY` to `'exocode-key'` as defaults when those environment variables are unset. When a user runs the `exocode` CLI without explicitly configuring `apis.json`, all Anthropic-bound API traffic — including the user's coding prompts and any caller-supplied content — is silently routed through the author-operated HuggingFace Space. The bundle header includes a `'0.0.0-leaked'` marker, consistent with a repackaged/pirated Anthropic Claude Code fork rather than an independent client. This is the silent-relay shape: the advertised CLI's normal use causes caller-supplied data to flow to an author-controlled destination by default. Additionally, the postinstall script (install.cjs) performs two aggressive actions: (1) `execSync('npm cache clean --force')` followed by `rm -rf` against the installer's `~/.npm/_cacache` directory, destroying cached artifacts for every other package on the machine; (2) silently `npm install -g bun` with a `curl -fsSL https://bun.sh/install | bash` fallback. The Bun install is purpose-aligned (the CLI shebang is `#!/usr/bin/env bun`) and uses the publisher's own domain, but the cache wipe affects unrelated packages and is not normal install behavior.\n","modified":"2026-05-27T00:31:54.731973384Z","published":"2026-05-22T01:16:46Z","withdrawn":"2026-05-26T21:28:12Z","database_specific":{"malicious-packages-origins":[{"import_time":"2026-05-26T05:51:57.322490842Z","modified_time":"2026-05-22T01:16:46Z","sha256":"5de237571ec90374a58a9259de84fe4b28f2e433164d7693477c6f8ddb6f5b7f","source":"amazon-inspector","versions":["0.0.11"],"id":"IN-MAL-2026-004108"},{"source":"amazon-inspector","versions":["0.0.17"],"id":"IN-MAL-2026-004131","import_time":"2026-05-26T05:51:59.812783049Z","modified_time":"2026-05-22T03:54:33Z","sha256":"6b1e32b74c68582be18feb35e92f095c753491a1c6b9e62b52eb0a1dbe300d69"},{"sha256":"b445d6e2164d1476aa9fcf1c40e850644677bf546e85d52ad486e582932cce17","source":"amazon-inspector","versions":["0.0.15"],"id":"IN-MAL-2026-004130","import_time":"2026-05-26T05:51:59.692415822Z","modified_time":"2026-05-22T03:38:39Z"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/@exocore/exocode/v/0.0.11"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@exocore/exocode/v/0.0.17"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@exocore/exocode/v/0.0.15"}],"affected":[{"package":{"name":"@exocore/exocode","ecosystem":"npm","purl":"pkg:npm/%40exocore%2Fexocode"},"versions":["0.0.11","0.0.17","0.0.15"],"database_specific":{"cwes":[{"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.","name":"Embedded Malicious Code"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"package_integrity":[{"filename":"exocode-0.0.11.tgz","hashes":{"sha512_sri":"sha512-3lq3vjIUNE6XdVdUuUw8kbr+2E03BhFHD4DOqu/6kdsxayDd4TZjt3Hq4U54dJ5uVrzskJIPwJPEKB4okHvTMA==","sha1":"60c53dedb2b4e636eb29b9ec0f8b01d19da49339"}}],"evidence_files":[{"path":"install.cjs","sha256":"8ae7e381fcc4ba40f4003ee3bfa7eb2b6e0ea7e0578d4ecb9fa095f86a0f288d","tlsh":"9941fed602a147787d32917eef077026699792022304fe54b9cf47552f8396487b31ee"},{"path":"dist/exocore","sha256":"a268e44e989cb308e1893a6ac30e616decc118e4261f61f2399cf00065aff57c","tlsh":"0337c569a9f714224253b0799f6f90067e349007390cee64be9c83946f8d52d92f7bec"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/withdrawn/npm/@exocore/exocode/MAL-2026-4388.json"}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["actran@amazon.com"],"type":"FINDER"}]}