14 real MCP server vulnerabilities, replayed through a pull request check

CodeMD · Our own testing on public advisories

AI agents now call tools that run commands on your machine. When one of those tools passes agent-supplied input into a shell, you get command injection. We took 14 published advisories for exactly that bug, went back to the commit that introduced each one, and ran the CodeMD Call-Path Security check on it, the way it checks a pull request.

12 of 14failed the check on the commit that added the bug
+2flagged in the repository's first commit
2 to 15 monthsbetween the bug landing and its public advisory

What "verified" means here

Every case below is a public advisory in GitHub's Advisory Database that links to the commit that fixed it. Each entry links to the advisory and to the commit where the check flagged the path, so you can look at the code yourself. We did not report these bugs and we did not find them first. The advisories were already public. What we tested is whether a pull request check would have pointed at the risky path at the time.

What this is and isn't. A failed check shows a path from outside input to a shell command. It doesn't prove the command is built unsafely; a reviewer decides that, with the AI verdict CodeMD Pro adds. These are results from 14 cases, not a guarantee the check finds every issue in your code. All the bugs are fixed now, and this isn't a criticism of the maintainers.

How we tested

  1. Picked published command-injection advisories (CWE-78) for open-source MCP servers that link to the fixing commit.
  2. Walked every earlier commit that touched the fixed files, oldest first, and compared each one to the commit before it.
  3. Counted a case as flagged only if the check failed on a function that was still risky in the version the fix changed. The first such commit is the one listed.
  4. Used the free check the GitHub App runs: no AI and no hand-tuning for these projects.

The pattern in all 14

Each time, a tool that an AI agent can call passes its input toward a shell command. Nothing about the path looks dramatic in a diff: a feature commit, a refactor, an "Add files via upload". That is the point. The risk is the route from the agent's input to the shell, and that route is easy to miss when you read one changed file at a time.

The cases

1. mcp-nmap-server

GHSA-xc68-rrqc-qgq3 · CVE-2026-3484 · Command injection · PhialsBasement/nmap-mcp-server

The commit “Add files via upload” (January 9, 2025) added it. The check reported this path: MCP tool call from an AI agent → runNmapScan: process/shell execution

Outcome: The CodeMD check fails on this commit, as it would on a pull request. Advisory published March 3, 2026, about 14 months later.

View the commit · View the advisory

2. mcp-maigret

GHSA-2g7v-hghf-grg4 · CVE-2026-2130 · Command injection · BurtTheCoder/mcp-maigret

The commit “Migrate to Docker Method” (December 13, 2024) added it. The check reported this path: MCP tool call from an AI agent → MaigretServer.execCommand: process/shell execution

Outcome: The CodeMD check fails on this commit, as it would on a pull request. Advisory published February 8, 2026, about 14 months later.

View the commit · View the advisory

3. xcode-mcp-server

GHSA-84fx-pwf3-7777 · CVE-2026-2178 · Command injection · r-huijts/xcode-mcp-server

The commit “fix: improve path resolution in init_swift_package tool” (April 1, 2025) added it. The check reported this path: MCP tool call from an AI agent → registerSPMTools: process/shell execution

Outcome: The CodeMD check fails on this commit, as it would on a pull request. Advisory published February 8, 2026, about 10 months later.

View the commit · View the advisory

4. mcp-markdownify-server

GHSA-45qj-4xq3-3c45 · CVE-2025-58358 · Command injection in the pptx-to-markdown tool · zcaceres/markdownify-mcp

The commit “feat: turn into generic markdownify module” (December 20, 2024) added it. The check reported this path: MCP tool call from an AI agent → createServer → Markdownify.toMarkdown → Markdownify._markitdown: process/shell execution

Outcome: The CodeMD check fails on this commit, as it would on a pull request. Advisory published September 2, 2025, about 8 months later.

View the commit · View the advisory

5. @elgentos/magento2-dev-mcp

GHSA-xqv9-qr76-hfq2 · CVE-2026-5603 · Command injection · elgentos/magento2-dev-mcp

The commit “Added cache commands” (September 28, 2025) added it. The check reported this path: MCP tool call from an AI agent → executeMagerun2Command: process/shell execution

Outcome: The CodeMD check fails on this commit, as it would on a pull request. Advisory published April 6, 2026, about 6 months later.

View the commit · View the advisory

6. mcp-package-docs

GHSA-vf9j-h32g-2764 · CVE-2025-54073 · Command injection in several tools · sammcj/mcp-package-docs

The commit “fix: docs parsing for npm (#8)” (March 5, 2025) added it. The check reported this path: MCP tool call from an AI agent → PackageDocsServer.searchPackageDocs, plus 5 more functions that run local Go and Python tooling: process/shell execution

Outcome: The CodeMD check fails on this commit, as it would on a pull request. Advisory published August 5, 2025, about 5 months later.

View the commit · View the advisory

7. mcp-server-kubernetes

GHSA-gjv4-ghm7-q58q · CVE-2025-53355 · Command injection in several tools · Flux159/mcp-server-kubernetes

The commit “Add Helm operations and schemas for managing Helm charts after refectoring” (March 17, 2025) added it. The check reported this path: MCP tool call from an AI agent → installHelmChart → executeHelmCommand: process/shell execution

Outcome: The CodeMD check fails on this commit, as it would on a pull request. Advisory published July 8, 2025, about 4 months later.

View the commit · View the advisory

8. lara-mcp

GHSA-xj5p-8h7g-76m7 · CVE-2025-53832 · Command injection in the import_tmx tool · translated/lara-mcp

The commit “feat: added translation memories support & unit tests (#5)” (April 11, 2025) added it. The check reported this path: MCP tool call from an AI agent → importTmx: process/shell execution

Outcome: The CodeMD check fails on this commit, as it would on a pull request. Advisory published July 21, 2025, about 3 months later.

View the commit · View the advisory

9. git-mcp-server

GHSA-3q26-f695-pp76 · CVE-2025-53107 · Command injection in several tools · cyanheads/git-mcp-server

The commit “refactor(gitMerge): implement logic and registration for git_merge tool” (April 28, 2025) added it. The check reported this path: MCP tool call from an AI agent → registerGitMergeTool → gitMergeLogic: process/shell execution

Outcome: The CodeMD check fails on this commit, as it would on a pull request. Advisory published June 30, 2025, about 2 months later.

View the commit · View the advisory

10. token-optimizer-mcp

GHSA-49mq-fc6q-3h46 · CVE-2026-55157 · Command injection · ooples/token-optimizer-mcp

The commit “fix: add .js extensions to file-operations imports for node esm compatibility (#69)” (October 23, 2025) added it. The check reported this path: MCP tool call from an AI agent → SmartBranchTool.branch, plus 23 more functions in its git and system tools: process/shell execution

Outcome: The CodeMD check fails on this commit, as it would on a pull request. Advisory published August 14, 2026, about 10 months later.

View the commit · View the advisory

11. Figma-Context-MCP

GHSA-gxw4-4fc5-9gr5 · CVE-2025-53967 · Command injection · GLips/Figma-Context-MCP

The commit “Add curl fallback to make API requests more robust in corporate environments (#150)” (May 28, 2025) added it. The check reported this path: MCP tool call from an AI agent → fetchWithRetry: process/shell execution, network call

Outcome: The CodeMD check fails on this commit, as it would on a pull request. Advisory published September 30, 2025, about 4 months later.

View the commit · View the advisory

12. mcp-for-stata

GHSA-4p62-hqp5-g644 · CVE-2026-47708 · Command injection · SepineTam/mcp-for-stata

The commit “refactor(stata)!: promote stata to top-level module” (March 17, 2026) added it. The check reported this path: MCP tool call from an AI agent → StataDo._execute_windows, plus 1 more function: process/shell execution

Outcome: The CodeMD check fails on this commit, as it would on a pull request. Advisory published June 4, 2026, about 3 months later.

This commit moved the code into a new module, so the check saw the risky path as new.

View the commit · View the advisory

13. adb-mcp

GHSA-54j7-grvr-9xwg · CVE-2025-59834 · Command injection · srmorete/adb-mcp

It was in the repository from its first commit (“Initial commit”, April 12, 2025). The check reported this path: MCP tool call from an AI agent → executeAdbCommand: process/shell execution

Outcome: Flagged in the first commit. A repository's first check only records a starting point, so today it would show a pass; a full scan or installing before the code is written would surface it. Advisory published September 24, 2025, about 5 months later.

View the commit · View the advisory

14. mcp-server-semgrep

GHSA-86hp-qxqp-w9wv · CVE-2026-7446 · Command injection · VetCoders/mcp-server-semgrep

It was in the repository from its first commit (“Initial commit”, February 1, 2025). The check reported this path: MCP tool call from an AI agent → SemgrepServer.handleScanDirectory, plus 7 more handlers: process/shell execution

Outcome: Flagged in the first commit. A repository's first check only records a starting point, so today it would show a pass; a full scan or installing before the code is written would surface it. Advisory published April 30, 2026, about 15 months later.

View the commit · View the advisory

A different kind of failure: when change detection breaks

Not every problem is a vulnerability. A public Sentry workflow (run 42934913116) expanded about 239,000 characters of changed-file lists into one script input, and the runner failed with "Argument list too long" before its JavaScript ran. CodeMD did not run on that repository. We include it as an independently observed example of why a list of changed files is not a test plan: CodeMD maps changed functions to the tests that reach them and hands CI a bounded set.

What this means for your team

  1. Review the route, not just the diff. The risky part of these changes was never in one line.
  2. Check on every pull request. The path is cheapest to look at the day it is added, not months later when an advisory lands.
  3. Keep a human in the loop. The check flags paths. Your reviewers, helped by AI explanations in Pro, decide which are real.

See the risk paths in your own pull requests

Free for public repositories. One click to install. CodeMD gives your team information about risk paths; it doesn't block attacks or replace a security program.

Install free on GitHub

See the summary on Bugs found