
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-5603 is an OS command injection vulnerability in the elgentos/magento2-dev-mcp Model Context Protocol (MCP) server for Magento 2 development. It affects all versions up to and including 1.0.2, with the root cause located in the executeMagerun2Command function within src/index.ts. The vulnerability was reported on March 11, 2026, and a patch was merged on March 12, 2026; it was publicly disclosed on April 5, 2026. It carries a CVSS v3.1 base score of 5.3 (Medium) and a CVSS v4.0 base score of 4.8 (Medium) (GitHub Advisory, ENISA EUVD).
The vulnerability is classified as CWE-77 (Command Injection) and CWE-78 (OS Command Injection). The executeMagerun2Command function in src/index.ts constructs shell command strings by directly interpolating user-supplied MCP tool parameters (such as key, type, path, value, query, vendorNamespace, moduleName, authorName, authorEmail, and others) and executes them via Node.js child_process.execAsync, which invokes a system shell. Because execAsync passes the constructed string to a shell interpreter, specially crafted input containing metacharacters such as ;, &, or | can break out of the intended command context and execute arbitrary additional commands. In MCP environments, LLM-generated tool parameters influenced by external content (prompt injection) may trigger this vulnerability without direct user interaction (GitHub Issue #4, GitHub PR #5).
Successful exploitation allows a local attacker with low privileges to execute arbitrary OS commands on the host running the MCP server, with the privileges of the MCP server process. This can result in unauthorized access to sensitive data (confidentiality impact), modification of system files or Magento configuration (integrity impact), and potential service disruption (availability impact). In AI-assisted development environments where the MCP server is integrated with LLM agents, prompt injection attacks could indirectly trigger command execution without direct local user interaction, expanding the effective attack surface (GitHub Issue #4, ENISA EUVD).
A proof-of-concept exploit is publicly available as a PDF document attached to the GitHub issue report (GitHub Issue #4). The CVSS v4.0 exploit maturity is rated as "Proof of Concept." The EPSS score is approximately 0.058% (0.000580), indicating a low but non-zero probability of exploitation in the wild. There is no current evidence of active in-the-wild exploitation or threat actor attribution, and the vulnerability is not listed in the CISA KEV catalog (GitHub Advisory, ENISA EUVD).
elgentos/magento2-dev-mcp version 1.0.2 or earlier, integrated with an AI agent (e.g., Claude, Cursor, Continue.dev) or accessible locally.key, path, value, query, vendorNamespace, moduleName, authorName, authorEmail, description, storeId, job, or group.; id > /tmp/pwned as a parameter value would cause the shell to execute the injected id command after the intended magerun2 command.config-set, dev-module-create, or any tool calling executeMagerun2Command) with the crafted parameter through the AI agent interface or directly via the MCP protocol.executeMagerun2Command function concatenates the malicious input into a shell command string and passes it to child_process.execAsync, causing the injected command to execute with the privileges of the MCP server process (GitHub Issue #4, GitHub PR #5)./bin/sh, /bin/bash, curl, wget, python, nc) with unusual arguments or connections./tmp/) by the MCP server process; new or modified cron jobs or scripts owned by the MCP server's service account.auditd) showing execution of unexpected shell commands originating from the magento2-dev-mcp process; shell history entries with injected metacharacters (;, &, |) in magerun2 command strings.Upgrade elgentos/magento2-dev-mcp to version 1.0.3 or later, which includes the fix introduced in commit aa1ffcc0aea1b212c69787391783af27df15ae9d. The patch refactors executeMagerun2Command to accept an argument array (args: string[]) instead of a raw command string, replaces child_process.execAsync with execFile/execFileAsync (which does not invoke a shell), and uses shellQuote for Docker wrapper command strings to prevent metacharacter injection. As an interim measure, restrict local user access to systems running the vulnerable MCP server and apply the principle of least privilege to the MCP server process account. Note that the project has since been marked as abandoned by the maintainer, as magerun2 now offers a built-in MCP server (magerun2 mcp:server:start) (GitHub Commit, GitHub Advisory, elgentos/magento2-dev-mcp).
A community blog post on dev.to explored the vulnerability pattern and discussed why shellQuote alone is insufficient as a mitigation, recommending the use of execFile instead (dev.to post). The vulnerability was picked up by automated CVE tracking feeds including CVEnew on social platforms and threat intelligence aggregators shortly after disclosure. The maintainer responded quickly by merging a GitHub Copilot-assisted fix within one day of the issue being filed, and subsequently marked the project as abandoned in favor of the upstream magerun2 MCP server (GitHub Issue #4, elgentos/magento2-dev-mcp).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."