Junglewise Threat Intelligence

CVE-2026-5603: elgentos magento2-dev-mcp OS command injection in executeMagerun2Command

CVE-2026-5603 · Severity: medium · CVSS 5.3 · Published 2026-04-05

Vendors: npm.

Executive brief

A security vulnerability was found in elgentos magento2-dev-mcp, a tool used to assist with Magento 2 development. The software fails to properly sanitize user input before executing system commands, which could allow a local attacker to run unauthorized commands on the host machine. This could lead to unauthorized data access or full system compromise depending on the permissions of the user running the tool.

Technical details

An OS command injection vulnerability exists in elgentos magento2-dev-mcp versions up to and including 1.0.2. The root cause is the unsafe use of child_process.execAsync within the executeMagerun2Command function in src/index.ts, which directly interpolates user-supplied parameters into shell commands. A local attacker can exploit this by providing specially crafted input containing shell metacharacters (e.g., ;, &, or |) to execute arbitrary commands with the privileges of the MCP server process. The issue has been addressed in commit aa1ffcc0aea1b212c69787391783af27df15ae9d by migrating to execFile and implementing proper argument quoting.

Affected products

  • elgentos magento2-dev-mcp <= 1.0.2

Timeline

  • 2026-03-11: disclosed: Issue reported on GitHub
  • 2026-03-12: patched: Fix merged via pull request #5
  • 2026-04-05: advisory: NVD/VulDB publication date

References