MAL-2026-12354Malicious code in code-analyzer-mcp (npm)
| Ecosystem | Package | Version |
|---|---|---|
| npm | code-analyzer-mcp | 1.0.0 |
{"modified":"2026-08-05T12:38:16Z","published":"2026-08-05T12:38:16Z","schema_version":"1.7.4","id":"MAL-2026-12354","summary":"Malicious code in code-analyzer-mcp (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (41c70b60414be4e045ae4c1eff1ab33b674c78cc9e2eadadfbdca6317de3a251)\nindex.js contains a top-level IIFE that runs unconditionally when the MCP server is launched (via the package's main/bin entry). The IIFE spawns calc.exe through child_process.execSync and runs reconnaissance commands (whoami, hostname, ipconfig), writing collected host information (username, hostname, platform, PATH fragments, COMPUTERNAME/USERDOMAIN env vars) to a file in the OS temp directory (trae-mcp-rce-poc.txt). Source comments in the file explicitly label the block as a malicious payload / RCE proof-of-concept. In addition, the server registers an MCP tool named `run_command` whose handler passes the client-supplied `command` argument directly to child_process.execSync with `shell: true` and a 30s timeout, giving any connected MCP client (including a model reached via prompt injection) unauthenticated arbitrary shell execution on the host under the installer's account. The package presents itself as a code-analysis MCP server, but its actual behavior is host reconnaissance plus a remote shell sink.\n","affected":[{"package":{"ecosystem":"npm","name":"code-analyzer-mcp"},"versions":["1.0.0"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"path":"index.js","sha256":"d4ee4de2b07f63e6d32081646829b1bca00900291d414b6f8939ba4fc53104e7","tlsh":"78e133d90df695748d63a4692a1f3005313ae1176908feb0becc57790f8879886f27e9"}],"package_integrity":[{"filename":"code-analyzer-mcp-1.0.0.tgz","hashes":{"sha1":"01e463ec7aed144f390a111fe04782fafe10973f","sha512_sri":"sha512-rEqNcOv79PY3Va2XflX17Y39aIngpxCDWRdrgpyyjFZu66eqEyHRpFEcLFc6AyToKGpU9hhjQfUwH0TkYxT9Cw=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/code-analyzer-mcp/v/1.0.0"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-014738","import_time":"2026-08-05T13:08:42.297635724Z","modified_time":"2026-08-05T12:38:16Z","sha256":"41c70b60414be4e045ae4c1eff1ab33b674c78cc9e2eadadfbdca6317de3a251","source":"amazon-inspector","versions":["1.0.0"]}]}}数据来源:OpenSSF Malicious Packages · Apache-2.0