mcp-server-git: a submodule's own configuration still runs programs on `git_diff` (with `diff.submodule=diff`) and on `git_checkout` / `git_
GHSA-8wv7-r664-7594 · published 2026-11-18 · updated 2026-11-27
- Severity
- High
- CVSS score
- 7.8
- Chance of exploitation (EPSS)
- No CVE
- Fixed in
- 2026.11.18
Affected: mcp-server-git 2026.11.11 (release v2.4.0), the latest release. Tested with git 2.53.0 and GitPython 3.2.1 on macOS.
Upgrade mcp-server-git to 2026.11.18 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.
Path 1: add ("diff.submodule", "short") to HARDENED_CONFIG. The command-scope override outranks the repository's value, so the nested diff never starts and the submodule is reported as a changed commit, as it is today without the setting. Path 2: the GIT_CONFIG_COUNT overrides are inherited by the git that runs inside the submodule, so the existing by-name driver override works there too once the names are known. In harden_repo, also list _LISTED_KEYS in each checked-out repository found at a gitlink in the index (following nested gitlinks), and add those drivers to the emptied set. This keeps git_add ["."] staging a moved submodule commit, which excluding submodule paths would not. …
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| mcp-server-git | PyPI | < 2026.11.18 | 2026.11.18 |
- CriticalLiteLLM has SQL Injection in Proxy API key verificationlitellmExploited
- Criticaln8n Vulnerable to Remote Code Execution via Expression Injectionn8nExploited
- HighLiteLLM has a sandbox escape in custom-code guardraillitellmExploited
- HighLangflow affected by Remote Code Execution via validate_code() exec()langflowExploited
- CriticalJupyter MCP Server: Browser DNS rebinding can hijack the Jupyter backend through management routesjupyter-mcp-server
- Criticalmem0ai Databricks vector store vulnerable to SQL injectionmem0ai
- Criticalmcp-server-git runs a repo's gpg.program via git_merge and git_branchmcp-server-git
- Criticalgit_add runs submodule filter commands when gitlink mode is not 160000mcp-server-git
- Criticalmcp-server-git: unexpandable sparse index lets submodule filter drivers runmcp-server-git
- Criticalgit: harden_repo ignores core.worktree, so repository-defined filters runmcp-server-git
- Criticalmcp-server-git --repository: checks a bare repo but runs a hidden .git's filtermcp-server-git
- Highgit: index entries under a symlink leak files outside --repositorymcp-server-git
The impact, patch and workaround text comes from the advisory, shortened (published by the MCP reference servers project). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.