NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Other MCP servers and tools

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

highCVSS 4.0 8.7GHSA-jq3q-62jc-fqq9

code-review-mcp-server before 1.5.3 puts the folderPath and baseBranch tool parameters into shell strings run by execSync(), so a crafted value runs arbitrary commands on the host. Upgrade the npm package to 1.5.3, which switches to execFileSync() with argument arrays. There is no workaround.

Published Nov 16, 2026 · Analysis Nov 17, 2026

What an attacker can do

The MCP server offers getLocalGitDiff, codeReview, createPR and getPRTemplate. They take folderPath and baseBranch strings. Those values were interpolated into command strings and run through child_process.execSync(), which uses /bin/sh.

A baseBranch such as main; COMMAND # ends the git command and runs the attacker's. A $(...) substitution works too, and a folderPath can break out of its surrounding quotes. The commands run with the privileges of the user running the MCP server, so an attacker can read files, steal tokens such as the GitHub token that gh uses, or install persistence.

The attacker must control the tool arguments. With an AI agent calling the tool, that can happen through prompt injection: a malicious pull request, branch name or issue text that the model copies into baseBranch. The advisory does not describe other access requirements. The CVSS 4.0 vector shows network access and low privileges.

Who is affected

All versions of the npm package code-review-mcp-server before 1.5.3. Any setup where an MCP client launches this server and an agent can call its four tools is exposed.

npm ls -g code-review-mcp-server
npm ls code-review-mcp-server

If you launch it with npx, check the version pinned in your MCP client config.

code-review-mcp-server

Ecosystem
npm
Affected
< 1.5.3
Fixed in
1.5.3
Check
npm ls code-review-mcp-server

How to fix it

Upgrade to code-review-mcp-server 1.5.3 or later:

npm install -g [email protected]

The fix replaces every execSync() call with execFileSync() and argument arrays, so inputs go to git and gh without a shell. The advisory says there is no workaround. Until you upgrade, remove the server from your MCP client config.

How to tell if you were hit

Look in shell history, process logs and EDR data for child processes of the MCP server that are not git or gh, such as sh -c with unexpected commands, curl or base64. Check tool-call logs for baseBranch or folderPath values that contain ;, $(, backticks or #. Beam records agent shell commands and MCP tool calls, and its rules can flag a tool call with shell metacharacters.

Original advisory

From the GitHub Advisory Database (CC BY 4.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; <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 [email protected] or later.

Credited to 123mutouren321414.

Questions

Which version of code-review-mcp-server fixes CVE-2026-68934?

Version 1.5.3. All earlier versions are affected, and the maintainers list no workaround.

Which parameters are injectable?

folderPath and baseBranch, in the getLocalGitDiff, codeReview, createPR and getPRTemplate tools. They reached execSync() unsanitised.

Can prompt injection trigger this?

It can if the agent passes attacker-influenced text, such as a branch name, as the parameter. The advisory only states that caller-controlled values reach the shell.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Other MCP servers and tools vulnerabilities

All Other MCP servers and tools entries