Skip to content
HighVulnerability

GHSA-jq3q-62jc-fqq9: code-review-mcp-server: Command injection via unsanitized folderPath/baseBranch parameters

Published
Record updated
View JSON
Affected
  • code-review-mcp-server < 1.5.3
Fixed in
1.5.3
  • released July 6, 2026, 133 days before disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.

Summary

code-review-mcp-server exposes MCP tools (getLocalGitDiff, codeReview, createPR, getPRTemplate) that take folderPath and baseBranch strings and interpolate them into shell commands run through child_process.execSync(), which uses /bin/sh. A crafted value such as a baseBranch containing a semicolon followed by a command, or a $(...) substitution, leads to arbitrary command execution on the host running the MCP server.

Mitigation

Fixed in 1.5.3. Every execSync() call was replaced with execFileSync() using argument arrays, so inputs go directly to git / gh without a shell. No workarounds are given; upgrade to code-review-mcp-server@1.5.3 or later.