A repository contained a manipulated Git index path with a traversal component pointing outside its intended root. When the Git MCP server answered git_diff, its data path could open host files that the agent otherwise was not meant to inspect. The resulting response could reveal their contents to the requester. Unlike the other Git MCP vulnerabilities in…
Inspect the ClaimsCase · DiggingBeagle record
Git MCP could read outside repository boundaries through a crafted index path
A crafted Git index pathname could make a nominal read reference files outside the allowed workspace without executing a shell command.
Published by DiggingBeagle:
Git MCP server 2026.11.11; attacker influences the .git/index data and the server process can read the target host path.
Assessment profile
Assessment method- Setting
- research demonstration
- Exploitation
- demonstrated
- Evidence
- Grade B
- Remediation
- patch available
- AI role
- AGAINST AI
Basis and provenance
Vendor or researcher primary evidence establishes the stated mechanism and its bounds; the public record does not support a population-wide impact score, prevalence or generalization to installations without the prerequisites.
Assessed Nov 21, 2026 using diggingbeagle.assessment/1.
Evidence basis: CLM-2026-NOV21-GITMCP-INDEX-1 · CLM-2026-NOV21-GITMCP-INDEX-2 · CLM-ENR271-GITMCP-INDEX · MCP Git server advisory GHSA-r2q8-f657-4r56 on git mcp could read outside repository boundaries through a crafted index path
At a glance
Repository-bound directory checks did not validate where individual paths inside .git/index would resolve. An attacker-controlled index entry could refer outside the selected repository, causing a nominally read-only diff tool to return host-file content that the server process could access. The disclosure is a confidentiality boundary, not a Git helper…
Read the implicationsThe host file must exist and be readable by the Git MCP process. No disclosed evidence shows bulk data extraction, and the advisory documents a testable path rather than a live campaign.
Limits and uncertaintyFull account
A repository contained a manipulated Git index path with a traversal component pointing outside its intended root. When the Git MCP server answered git_diff, its data path could open host files that the agent otherwise was not meant to inspect. The resulting response could reveal their contents to the requester. Unlike the other Git MCP vulnerabilities in this release, this finding concerns file confidentiality rather than execution through a Git helper.
The host file must exist and be readable by the Git MCP process. No disclosed evidence shows bulk data extraction, and the advisory documents a testable path rather than a live campaign.
Mechanism and trust boundary
- 01
Crafted index uses an outside path
The repository index points to a file that resolves outside the configured --repository boundary even though its top-level directories pass validation.
Boundary: untrusted Git index -> host filesystem path
- 02
Read-only diff returns host file
Git reads the accessible outside file and includes its contents in a tool response.
Boundary: repository restriction -> model-visible host data
Claims & evidence
CLM-ENR271-GITMCP-INDEXThe advisory says git_diff and git_diff_unstaged could return content from a file outside the --repository directory when a crafted index contained a traversal path.supported
Basis: reported finding
- supportsMCP Git server advisory GHSA-r2q8-f657-4r56 on git mcp could read outside repository boundaries through a crafted index pathprimary disclosure
Summary: crafted index path, read-only diff and host-file disclosure
CLM-2026-NOV21-GITMCP-INDEX-1A crafted Git index pathname could make a nominal read reference files outside the allowed workspace without executing a shell command.supported
Basis: reported finding
- supportsMCP Git server advisory GHSA-r2q8-f657-4r56 on git mcp could read outside repository boundaries through a crafted index pathprimary disclosure
Security advisory: malicious index path and out-of-workspace diff read
CLM-2026-NOV21-GITMCP-INDEX-2The maintainer identifies 2026.11.18 as the fixed Git MCP release for this mechanism.supported
Basis: reported finding
- supportsMCP Git server advisory GHSA-r2q8-f657-4r56 on git mcp could read outside repository boundaries through a crafted index pathprimary disclosure
Security advisory: patched version and affected range
Implications
Repository-bound directory checks did not validate where individual paths inside .git/index would resolve. An attacker-controlled index entry could refer outside the selected repository, causing a nominally read-only diff tool to return host-file content that the server process could access. The disclosure is a confidentiality boundary, not a Git helper execution path; protecting config and hooks alone cannot prevent it.
Controls and mitigations
- Upgrade the MCP Git server to the fixed 2026.11.18 release and keep its operating-system privileges restricted.
- Test repository-originated Git configurations and nested state separately from the chat model, using a synthetic repository and non-sensitive host files.
Unknowns and contradictions
- The host file must exist and be readable by the Git MCP process. No disclosed evidence shows bulk data extraction, and the advisory documents a testable path rather than a live campaign.
Sources and citation
Material revision history
- Nov 21, 2026 · Published version · first publication · revision 272