XYZ-2026-00274
mcp-server-git: a repository's own config could run a command from a read-only tool call
Flagged in the source code
CyberXYZ spotted this security fix in the package's source code on 18 Nov 2026. The maintainers confirmed it in public as GHSA-pm7p-vphh-2cg7.
- CyberXYZ flagged the fix
- Advisory published
What was wrong
Version 2026.11.11 added a defence that lists the filter and merge drivers a repository defines and blanks them, so nothing in the repository can run a program. The pattern that builds the list needed at least one character in the driver name. Git also accepts a driver with an empty name, so those keys were never blanked.
Impacthigh
Command execution with the privileges and environment of the MCP server process, which on a developer machine means that user's tokens, keys and source access. A read-only tool such as git_status is enough, and it returns a normal-looking result. The --repository restriction does not help, because the malicious repository is the one inside the boundary.
Who is affected
Users of mcp-server-git before 2026.11.18 who point it at a repository whose .git/config was written by someone else: an unpacked archive, a CI artifact, a shared folder or a copied workspace. A plain git clone does not carry .git/config, so cloning is not a delivery path.
What to do
Upgrade to mcp-server-git 2026.11.18. Until then, do not open repositories that arrived with their own .git directory from a source you do not trust.
Reported to the maintainers by @pterpen and fixed by the MCP servers maintainers. Advisory: GHSA-pm7p-vphh-2cg7.
{
"id": "XYZ-2026-00274",
"summary": "mcp-server-git: a repository's own config could run a command from a read-only tool call",
"aliases": [
"GHSA-pm7p-vphh-2cg7"
],
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "mcp-server-git"
},
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "2026.11.18"
}
]
}
]
}
],
"references": [
{
"type": "FIX",
"url": "https://github.com/modelcontextprotocol/servers/commit/9acea80e8a91bf9dd64eec5d81cd9441ac3a41e2"
}
],
"credits": [
{
"name": "CyberXYZ Security Threat Intel Team",
"contact": [
"https://cyberxyz.io"
],
"type": "ANALYST"
}
],
"database_specific": {
"cwe_ids": [
"CWE-78"
]
}
}
An excerpt of this record in the OSV format, for tools that read advisories. The full record as JSON.
The bug was found and fixed by the package's maintainers. CyberXYZ flagged the fix in the source and recorded the release that carries it. All CyberXYZ Advisories · The mcp-server-git report