CVE-2026-68934: Command Injection in code-review-mcp-server via Unsanitized Parameters

A high-severity command injection vulnerability in code-review-mcp-server allowed attackers to execute arbitrary commands through unsanitized MCP tool parameters before version 1.5.3.

Christopher Ort
By i10X News Desk · Reviewed by Christopher Ort · 2 min read
Share
A developer's terminal window displaying git commands with red warning symbols indicating a security vulnerability
Image: AI-generated, i10X
On this page
  1. Quick Take
  2. In plain English
  3. What happened
  4. What you should do
  5. What it means
  6. Sources
i10X Quick Take

Quick Take

  1. What: Command injection vulnerability in code-review-mcp-server MCP tools via unsanitized folderPath and baseBranch parameters
  2. Severity: High (CVSS 8.7)
  3. Who is affected: Users running code-review-mcp-server versions before 1.5.3
  4. Fixed version: 1.5.3
  5. What to do: Upgrade to code-review-mcp-server version 1.5.3 or later

In plain English

A security flaw in code-review-mcp-server, a tool that automates code review and posts comments on GitHub pull requests, allowed attackers to run any command they wanted on the computer running the server. The problem happened because the tool accepted folder paths and branch names from users and passed them directly to shell commands without checking for dangerous characters. An attacker could type something like main; delete everything as a branch name and the server would execute it. Version 1.5.3 fixes this by passing arguments safely to git and gh commands without using a shell.

What you should do: If you use this tool, you should upgrade immediately. If you don’t use code-review-mcp-server, you can ignore this.

What happened

code-review-mcp-server is an MCP (Model Context Protocol) server that automates code review and can post comments directly on GitHub pull requests. Prior to version 1.5.3, four MCP tools (getLocalGitDiff, codeReview, createPR, and getPRTemplate) accepted caller-controlled folderPath and baseBranch string parameters that were interpolated into command strings executed by child_process.execSync through /bin/sh.

Because these parameters were not sanitized, shell metacharacters, command substitution (such as $(command)), or quote-breaking input could execute arbitrary commands with the privileges of the host process running the MCP server. For example, a baseBranch value of “main; rm -rf ~ #” would execute the rm command after the intended git command.

The vulnerability was reported by security researcher Yinci Chen (123mutouren321414) in issue #56. The maintainer confirmed the command injection and released the fix in version 1.5.3.

What you should do

Upgrade to code-review-mcp-server version 1.5.3 or later. The package is available on npm. There are no workarounds; upgrading is the only mitigation.

What it means

The fix replaces every execSync() call with execFileSync() using argument arrays, so user-controlled MCP tool inputs (folderPath, baseBranch, currentBranch, branchName, filePath) are passed directly to git and gh commands without going through a shell. This eliminates the injection at its root.

In getGitHandler.ts, all git execSync calls were replaced with execFileSync using argument arrays. In cliProvider.ts, all gh execSync calls were replaced with execFileSync, and the jq filename filter is now built via JSON.stringify to ensure attacker-controlled filenames remain safe jq string literals. The fragile denylist helpers escapeShellArg, escapeComment, and formatComment in formatComment.ts were removed as they are no longer needed.

The vulnerability is tracked as CVE-2026-68934 and assigned CWE-78 (Improper Neutralization of Special Elements used in an OS Command). GitHub published security advisory GHSA-jq3q-62jc-fqq9 crediting Yinci Chen as the reporter.

Command injection through MCP tool parameters keeps turning up in AI developer tooling: compare the command execution flaw in the Heym MCP stdio transport and the command injection in GitHub Copilot for JetBrains. New cases are tracked in our AI Security hub.

Sources

NVD entry CVE-2026-68934; GitHub Security Advisory GHSA-jq3q-62jc-fqq9 (Orcus2021/code-review-mcp-server); project issue #56, pull request #57 and commit d116423; release notes v1.5.3.

Christopher Ort

Christopher Ort

Christopher Ort is the editor of i10X News at i10x.ai. He has worked hands-on with AI tools, models and agent workflows for years and leads i10X’s coverage of AI launches, funding and research. He is the author of “The Style Penalty”, an SSRN study on how frontier AI models judge AI-written CVs, covered by heise online and t3n.

Editor's picks

  1. Georgia Tech’s Academic AI Playbook: 20 Lessons From 67 Real Courses, Free to Reuse
  2. Arcfront’s $1B Run Rate: What the AI Data Startup Confirms and What It Doesn’t
  3. GPT-6.2 Astra Tops Blueprint-Bench 2, 70% Above May Leader GPT-5.5
  4. Deutsche Telekom Puts 100 Million Euros Into Mistral for Sovereign AI in Germany
  5. Inkling 2 Mini: Thinking Machines’ Looped Open Model Tops Qwen on Coding Tests