AAK-MCP-SHARIQ-GITHUB-CVE-2026-102906-001: @0xshariq/github-mcp-server runs git commands built from tool arguments through a shell (no fixed release)
- Severity
- MEDIUM
- Category
- Supply Chain (
supply-chain) - Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py- Auto-fixable
- No.
- SARIF name
ShariqGithubMcpGitCommandInjection
What it detects
@0xshariq/github-mcp-server (npm; 0xshariq/github-mcp-server), a git MCP server, builds its git commands as strings from tool arguments and runs them with child_process.exec. The Git Remove tool's gitRemove(file) runs git reset HEAD "${file}", so a file argument carrying $(...) or a closing quote runs shell commands as the server's user, and an agent that reads untrusted text can be steered into that call. The only check, that the command starts with git, does not stop it (CVE-2026-102906, CVSS 3.1 6.3, CWE-77/CWE-78). The same exec of an interpolated string backs most of the other git tools. Every published version has it (2.0.0 through 2.5.0, the newest), the project has not answered the report (issue #2), and there is no fixed release, so this is a presence-only pin.
How to fix
There is no fixed release. Remove the server from agents that read untrusted content, or replace it with a git MCP server that passes arguments to execFile/spawn as an array. Pin the first fixed release once it ships.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-MCP-SHARIQ-GITHUB-CVE-2026-102906-001
Limitations
Reports a reference that names @0xshariq/github-mcp-server: a package.json or lockfile entry, or the package in an MCP config. Presence-only: every version is reported, a future fixed one included, until the pin gets a floor. GitHub's own github-mcp-server and @modelcontextprotocol/server-github are different projects and are not matched. A file over 2 MB, or a lockfile over 32 MiB, is not read. A declaration nested more than 64 levels deep in package.json, a TOML manifest or an MCP config (an MCP server more than 62) is still judged, and reported without a line; a lockfile entry keeps its line at any depth.
References
- CVE: CVE-2026-102906
- OWASP MCP Top 10: MCP04:2025 (Software Supply Chain Attacks & Dependency Tampering), MCP05:2025 (Command Injection & Execution)
- OWASP Agentic Top 10: ASI04 (Agentic Supply Chain Vulnerabilities), ASI05 (Unexpected Code Execution (RCE))
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-INJECT-01 (Shell Injection via MCP)
- CSA AI Controls Matrix (AICM): IVS-04, STA-08
All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-SHARIQ-GITHUB-CVE-2026-102906-001.md: the page then shows that text, with the registry reference appended under it.