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

State
Published
Severity
5.8 Medium
Published
Nov 23, 2026
Updated
Nov 24, 2026
Reserved
Nov 21, 2026

Read the record on cve.org

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.

ProductVersions
mcp-server-git Anthropicbefore 2026.10.28 Affected

Weaknesses

  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.