Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain tool-invocation access to confined server
-
DeliveryPlant nested .git file with outside gitdir pointer
-
ExploitPass nested path through validate_repo_path check
-
ExecutionGitPython follows gitdir redirection to outside repo
-
ImpactRead committed files and create branches beyond --repository boundary
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Applies ONLY when mcp-server-git is started in confined mode with --repository <allowed>. Three concrete prerequisites must all hold: (1) the attacker can invoke the server's git tools (e.g. git_show, git_create_branch) against the instance; (2) a nested directory containing a .git file with a 'gitdir:' pointer to an outside repository can be created inside the allowed tree, or such content can be caused to be placed there (one realistic path is a co-located filesystem MCP server with write access and no .git exclusion); and (3) the attacker knows or can guess the filesystem path of a repository outside the allowed root that the MCP process is permitted to access. Limiting factors that reduce real-world risk: it requires existing tool-invocation privilege (PR:L, not unauthenticated), it is local/config-dependent (AV:L), it requires the attacker-supplied gitdir indirection and knowledge of the target path (AT:P), and impact is confined to repositories the server process can already reach on the host; demonstrated impact is read of committed content and ref creation, not arbitrary host-file write or code execution. |
| Impact | This is a confinement-bypass (CWE-22 path traversal) in mcp-server-git, scored CVSS 4.0 5.8 (Medium) with vector AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N and no subsequent-system impact (SC:N/SI:N/SA:N). The signals are consistent and point to a real-but-bounded issue rather than an emergency: AV:L plus PR:L means it is not a remote unauthenticated flaw - the attacker must already be able to invoke the confined server's tools - and AT:P reflects the genuine precondition that attacker-controlled content (a nested .git gitdir file) must exist in the allowed tree and the outside repository path must be known or guessed. VC:H captures confirmed disclosure of committed content from an out-of-scope repository, while VI:L reflects the limited integrity impact (branch/ref creation, not arbitrary host write or code execution, per the advisory). The vuln.today decision label is 'this_month', not act_now/emergency, which aligns with a medium-severity post-access boundary bypass. It is NOT in CISA KEV (no confirmed active exploitation), and no EPSS score was supplied, so widespread exploitation probability cannot be quantified from the input. A working reproduction script is published inside the GHSA advisory and was confirmed by the reporter against package version 2026.10.19, so exploitability is demonstrated even though it is not independently listed as a weaponized exploit. One caveat worth verifying: the source CVSS uses AV:L, but mcp-server-git is often fronted by an agent/LLM over stdio or a network transport, so the practical 'local' boundary depends on deployment - the exploit is reachable by anyone able to reach the tool interface, which may be more than a locally-logged-in user. |
| Exploit ScenarioDerived | In a deployment where an attacker (or a compromised agent/LLM caller) can both invoke the confined mcp-server-git tools and get a file written into the allowed --repository tree - for example a co-located filesystem MCP server with write access to the same directory - the attacker plants a nested directory containing a .git file holding 'gitdir: /path/to/outside-repository/.git'. They then call git_show on that nested path to read committed content from the outside repository and git_create_branch to create refs in it, all with the MCP process's OS privileges. A confirmed working proof-of-concept reproduction script is included in the GHSA advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 23, 2026
Repository confinement in mcp-server-git before 2026.10.28 can be bypassed in confined --repository mode by a caller who can invoke the server's git tools, can place a nested directory containing a .git file with a gitdir pointer inside the allowed tree, and knows the outside repository path. The indirection causes GitPython to open an outside repository, letting the caller read committed content and create branches there; demonstrated impact is limited to repositories the MCP process can already reach, not arbitrary host-file write or code execution. No CISA KEV entry or confirmed public exploit code is identified at time of analysis, though the advisory contains a minimal reproduction; CVSS 4.0 score is 5.8 Medium.
RemediationAI
Upgrade mcp-server-git to 2026.10.28 or later; this is the vendor-released fixed version listed for the pip package, and the GHSA advisory is at https://github.com/modelcontextprotocol/servers/security/advisories/GHSA-w766-5x43-whvw. Until upgrade is possible, apply confinement-specific controls: avoid giving untrusted callers access to git tools on a --repository-confined instance, and do not co-locate a filesystem MCP server with write access to the same allowed tree without a .git exclusion, because that is a realistic way to plant the nested .git gitdir file. Reject .git file indirection by default when --repository is configured, and validate the resolved repository identity after opening rather than relying only on the original repo_path string; account for legitimate linked worktrees and separate git directories so the policy binds an allowed repository/worktree relationship instead of a naive git_dir prefix check. Monitor the allowed tree for nested .git files pointing outside the allowed root.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The issue is CWE-22 path traversal in mcp-server-git's repository validation. In server.py, validate_repo_path() canonicalizes the caller-supplied repo_path with Path.resolve() and checks it is inside the allowed repository; open_repo() then passes that path to git.Repo(). Path.resolve() handles filesystem symlinks but does not interpret Git's .git file redirection, so a nested directory inside the allowed tree whose .git file contains 'gitdir: /outside/repo/.git' passes validation. GitPython follows the gitdir pointer when opening the repository, and there is no post-open check that the repository Git actually selected is the allowed one, so subsequent tool calls such as git_show and git_create_branch operate on the outside repository. The affected package is pip mcp-server-git; the advisory confirms version 2026.10.19 and tests commits 82acf2aabf47bd462606a0d879e4849c26b2afae and ef9808f71090d0db3eda99e2af2ba78f1086f4fb, noting other versions were not assessed. No CPE strings were provided.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Local, config-dependent bypass needing tool-invocation privilege and an attacker-planted gitdir file (PR:L, AV:L); discloses outside-repo content (C:H), only creates refs (I:L), no availability impact.
Primary rating from Vendor (98a01053-8a31-4f6d-9aa9-252be161adc6).
CVSS VectorVendor: 98a01053-8a31-4f6d-9aa9-252be161adc6
Lifecycle Timeline
1DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
EUVD-2026-133154
GHSA-7f33-9hc8-6cr8
NVD
CVE.org
EPSS
Exploit-DB