What happened
Prior to 1.5.3, code-review-mcp-server (which automates code review and posts GitHub comments) interpolated caller-controlled folderPath, baseBranch, currentBranch, branchName, filePath and comment/title/body parameters directly into strings passed to child_process.execSync() through /bin/sh (CWE-78, CVSS 8.7). Unquoted/shell-metacharacter values break out and execute arbitrary commands with the privileges of the MCP server process. Fixed in 1.5.3 by switching to execFileSync with argument arrays. Reported by Yinci Chen (issue #56).
Why it matters
This is a concrete agentic code-execution flaw: an LLM agent calling the MCP tool is the attack vector, so prompt-injected or hostile content drives arbitrary shell execution on the machine running the code reviewer. It sits in the same risk class as other MCP/agent-tool command-injection bugs in AI developer tooling and is routable from untrusted repo content.
Attack vector
MCP tool parameters (folderPath/baseBranch/branchName/filePath) containing shell metacharacters or command substitution reach execSync() and execute on the host
Affected systems
code-review-mcp-server < 1.5.3 (getLocalGitDiff, codeReview, createPR, getPRTemplate tools)
Mitigation
Upgrade to code-review-mcp-server 1.5.3+ (GHSA-jq3q-62jc-fqq9); no workaround — upgrading is the only mitigation