CVE-2026-134465

mcp-server-git: nested gitdir file bypasses --repository restriction

Published Nov 23, 2026 CVSS 4.0 · 5.8 Medium EPSS n/a KEV · Not listed
Description
In mcp-server-git before 2026.10.28, the --repository restriction can be bypassed through a nested directory that contains a .git file with a gitdir pointer to a repository outside the allowed path. A caller who can invoke the server's tools, place such a file in the allowed tree, and knows the outside repository's path can read committed content from that repository and create branches in it.

Analysis

AI-generated

Technical impact

The vulnerability exists in Anthropic's mcp-server-git prior to version 2026.10.28. A user who can run the server’s tools can place a .git file inside an allowed directory that contains a gitdir pointer to a repository outside the restricted path. This enables the attacker to read any committed content from that external repository and to create branches within it. The weakness stems from inadequate path validation and is classified under CWE-22. The impact is a breach of confidentiality and integrity for repositories that the attacker can reach.

Affected Systems

Anthropic's mcp-server-git product, all releases before 2026.10.28. The affected version range is any pre‑2026.10.28 build where the --repository restriction is enforced.

Risk and Exploitability

The CVSS score of 5.8 indicates a moderate severity level. The EPSS score is not available, so the exact exploit probability is unknown, but the lack of a KEV listing means no confirmed public exploitation has been reported yet. The likely attack vector requires the attacker to invoke the server’s tools and write to the allowed directory, implying either local or authenticated remote access to the server. If that access is available, the attacker can exploit the bypass to gain unauthorized read and write access to repositories outside the intended scope.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to mcp-server-git version 2026.10.28 or later
  • Restrict the creation of .git files in the allowed directory or use stricter validation to reject gitdir pointers that reference outside paths
  • Limit the execution of server tools to trusted users and enforce strict permissions on the allowed directory

Generated by OpenCVE AI on November 23, 2026 at 17:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Description In mcp-server-git before 2026.10.28, the --repository restriction can be bypassed through a nested directory that contains a .git file with a gitdir pointer to a repository outside the allowed path. A caller who can invoke the server's tools, place such a file in the allowed tree, and knows the outside repository's path can read committed content from that repository and create branches in it.
Title mcp-server-git: nested gitdir file bypasses --repository restriction
Weaknesses CWE-22
References
Metrics cvssV4_0

{'score': 5.8, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N'}

Subscriptions

No data.

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Sources

Status
PUBLISHED
Assigner
Anthropic
Published
Updated
Nov 23, 2026, 4:00 PM
Reserved
Nov 21, 2026, 12:17 AM
Status
Received
Published
Nov 23, 2026, 4:17 PM
Modified
Nov 23, 2026, 4:17 PM