Malicious code in code-analyzer-mcp (npm)
The npm package 'code-analyzer-mcp' version 1.0.0 contains malicious code that executes arbitrary shell commands on the host. When launched, it runs a payload that collects host information and writes it to a temporary file. It also exposes a remote command execution capability via an MCP tool that allows unauthenticated clients to run arbitrary shell commands with the installer's privileges.
AI Analysis
Technical Summary
The 'code-analyzer-mcp' npm package (version 1.0.0) includes a top-level immediately-invoked function expression (IIFE) that executes upon server start. This IIFE runs reconnaissance commands (whoami, hostname, ipconfig) and writes collected system information to a temporary file labeled as a malicious payload. Additionally, the package registers an MCP tool named 'run_command' which accepts a client-supplied command and executes it directly via child_process.execSync with shell access and a 30-second timeout. This allows any connected MCP client, including those reached through prompt injection, to perform unauthenticated arbitrary shell execution on the host under the installer's account. The package masquerades as a code analysis tool but functions as a remote shell sink and host reconnaissance agent.
Potential Impact
An attacker who can connect to the MCP server can execute arbitrary shell commands on the host system without authentication, potentially leading to full system compromise under the installer's privileges. The initial reconnaissance payload also collects sensitive host environment information and writes it to disk, which could aid further attacks or data exfiltration.
Mitigation Recommendations
No official patch or remediation is currently available for this malicious package version. Users should immediately uninstall 'code-analyzer-mcp' version 1.0.0 and avoid installing or running this package. Verify the integrity of installed packages and use trusted sources. Monitor for any unauthorized MCP server instances and restrict network access to prevent attacker connections.
Malicious code in code-analyzer-mcp (npm)
Description
The npm package 'code-analyzer-mcp' version 1.0.0 contains malicious code that executes arbitrary shell commands on the host. When launched, it runs a payload that collects host information and writes it to a temporary file. It also exposes a remote command execution capability via an MCP tool that allows unauthenticated clients to run arbitrary shell commands with the installer's privileges.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The 'code-analyzer-mcp' npm package (version 1.0.0) includes a top-level immediately-invoked function expression (IIFE) that executes upon server start. This IIFE runs reconnaissance commands (whoami, hostname, ipconfig) and writes collected system information to a temporary file labeled as a malicious payload. Additionally, the package registers an MCP tool named 'run_command' which accepts a client-supplied command and executes it directly via child_process.execSync with shell access and a 30-second timeout. This allows any connected MCP client, including those reached through prompt injection, to perform unauthenticated arbitrary shell execution on the host under the installer's account. The package masquerades as a code analysis tool but functions as a remote shell sink and host reconnaissance agent.
Potential Impact
An attacker who can connect to the MCP server can execute arbitrary shell commands on the host system without authentication, potentially leading to full system compromise under the installer's privileges. The initial reconnaissance payload also collects sensitive host environment information and writes it to disk, which could aid further attacks or data exfiltration.
Mitigation Recommendations
No official patch or remediation is currently available for this malicious package version. Users should immediately uninstall 'code-analyzer-mcp' version 1.0.0 and avoid installing or running this package. Verify the integrity of installed packages and use trusted sources. Monitor for any unauthorized MCP server instances and restrict network access to prevent attacker connections.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-12354
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a735746bf8831d53915a02a
Added to database: 08/05/2026, 15:31:18 UTC
Last enriched: 08/05/2026, 17:31:18 UTC
Last updated: 08/05/2026, 17:31:18 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.