CVE-2026-68934: code-review-mcp-server: Command injection via unsanitized folderPath/baseBranch parameters
Impact
code-review-mcp-server exposes MCP tools (getLocalGitDiff, codeReview, createPR, getPRTemplate) that accept folderPath and baseBranch string parameters. These caller-controlled values were interpolated directly into shell command strings executed via childprocess.execSync(), which runs commands through /bin/sh.
A crafted value such as baseBranch = "main; <arbitrary command> #" (or a $(...) command substitution, or a folderPath that breaks out of the surrounding quotes) results in arbitrary command execution on the host running the MCP server.
Patches
Fixed in 1.5.3. Every execSync() call was replaced with execFileSync() using argument arrays, so inputs are passed directly to git / gh without going through a shell, eliminating the injection at its root.
Workarounds
None. Upgrade to code-review-mcp-server@1.5.3 or later.
Other sources
code-review-mcp-server automates code review and can post comments directly on GitHub pull requests. Prior to 1.5.3, the getLocalGitDiff, codeReview, createPR, and getPRTemplate MCP tools accept caller-controlled folderPath and baseBranch string parameters that are interpolated into command strings executed by childprocess.execSync through /bin/sh. Shell metacharacters, command substitution, or quote-breaking input can therefore execute arbitrary commands with the privileges of the host process running the MCP server. This issue is fixed in version 1.5.3.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/code-review-mcp-serverto a version that resolves this vulnerability.Fixed in 1.5.3 - Upgrade
Upgrade
code-review-mcp-serverto a version that resolves this vulnerability.Fixed in 1.5.3
Event History
Frequently Asked Questions
Who can exploit this issue?
Any caller able to invoke the affected MCP tools and control the folderPath or baseBranch parameters can supply shell metacharacters, command substitution, or quote-breaking input. Commands run with the privileges of the host process running the MCP server.
Which operations are affected?
The affected MCP tools are getLocalGitDiff, codeReview, createPR, and getPRTemplate. Each accepts caller-controlled folderPath and/or baseBranch values that are interpolated into shell command strings.
What versions are affected and what is the fix?
Versions prior to 1.5.3 are affected. Upgrade code-review-mcp-server to version 1.5.3, which fixes the issue.