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 child_process.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.
What to do
Upgrade to code-review-mcp-server@1.5.3 or later. There are no known workarounds.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | code-review-mcp-server | < 1.5.3 | 1.5.3 |
References
- https://github.com/Orcus2021/code-review-mcp-server/security/advisories/GHSA-jq3q-62jc-fqq9
- https://github.com/Orcus2021/code-review-mcp-server/issues/56
- https://github.com/Orcus2021/code-review-mcp-server/pull/57
- https://github.com/Orcus2021/code-review-mcp-server/commit/d11642322b607556affaaa3fd631d4f8942c05d8
- https://github.com/Orcus2021/code-review-mcp-server
- https://github.com/Orcus2021/code-review-mcp-server/releases/tag/v1.5.3
- CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N- Weakness (CWE)
CWE-78- Platform
- npm
- Package
code-review-mcp-server- Disclosed
- 16.11.2026
- Updated
- 17.11.2026 10:00
Sources and licenses · Edited or translated by DockRay; source rights and applicable licenses are retained.
OSV / GitHub Advisory Database - GHSA-jq3q-62jc-fqq9 - CC BY 4.0
Vulnerability history: code-review-mcp-server
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
This is the only known vulnerability of this package.
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.