VulnWatch VulnWatch
← Back to dashboard
High github · GHSA-jq3q-62jc-fqq9

code-review-mcp-server: Command injection via unsanitized folderPath/baseBranch parameters

Published Nov 16, 2026 CVSS 0.0

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 child_process.execSync(), which runs commands through /bin/sh.

A crafted value such as baseBranch = "main; #" (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 [email protected] or later.

Affected AI Products

mcp server
Get the weekly digest. Every Monday: top AI security stories of the week. Free.