mcp-server-git: `repo_path` expands environment variables and the error message discloses their values
GHSA-f33v-89w7-f9vc · published 2026-11-27
- Severity
- Medium
- CVSS score
- Not scored
- Chance of exploitation (EPSS)
- No CVE
- Fixed in
- 2026.11.27
Any environment variable of the server process can be read by whoever controls repo_path. In practice that is an LLM following instructions injected in a README, an issue or a web page. MCP servers commonly run with provider API keys and tokens in their environment.
Upgrade mcp-server-git to 2026.11.27 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.
With this change, $DEMO_SECRET stays literal ( ). A normal repo_path still returns the repository status. I verified this end to end on 2026.11.18 with the one-line change in open_repo. Optionally, also stop echoing the full resolved path in error messages.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| mcp-server-git | PyPI | < 2026.11.27 | 2026.11.27 |
- CriticalPhoenix: Format String Injection in applyChatTemplatearize-phoenix
- CriticalFlowise: Unauthenticated OAuth2 token refresh endpoint returns access tokens — enables token theft for any connected serviceflowise
- CriticalCrawl4AI: authentication bypass vulnerability due to a hardcoded default JWT signing key in the Docker API servercrawl4ai
- CriticalMLflow: Environment variable injection in AI Gateway secrets enables server-side credential exfiltrationmlflow
- CriticalvLLM has RCE In Video Processingvllm
- HighConfig revision hashes could expose password verifiersopenclaw
- 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.