Case · 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:

Scope

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.

At a glance

Mechanism and trust boundary

  1. 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

  2. 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

Link to claim
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

Link to claim
CLM-2026-NOV21-GITMCP-INDEX-2The maintainer identifies 2026.11.18 as the fixed Git MCP release for this mechanism.supported

Basis: reported finding

Link to claim

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

  1. Nov 21, 2026 · Published version · first publication · revision 272