Where
-Infinity
0
OS Command Injection

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.

1 / 2
Source: GitHub
First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203