Skip to content
Heist/ feed
Back to feed
High

@cyanheads/git-mcp-server vulnerable to command injection in several tools

Type: advisorySources: OSV

@cyanheads/git-mcp-server is an MCP server designed to interact with Git repositories. Prior to version 2.1.5, there is a command injection vulnerability caused by the unsanitized use of input parameters within a call to child_process.exec, enabling an attacker to inject arbitrary system commands. Successful exploitation can lead to remote code execution under the server process's privileges. The server constructs and executes shell commands using unvalidated user input directly within command-line strings. This introduces the possibility of shell metacharacter injection (|, >, &&, etc.). An MCP Client can be instructed to execute additional actions for example via indirect prompt injection when asked to read git logs. This issue has been patched in version 2.1.5.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-53107
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 12:32 UTC · Revision 1

Source evidence

@cyanheads/git-mcp-server vulnerable to command injection in several tools

core-osv · Original source

Published 1 Jul 2025, 17:55 UTC

@cyanheads/git-mcp-server is an MCP server designed to interact with Git repositories. Prior to version 2.1.5, there is a command injection vulnerability caused by the unsanitized use of input parameters within a call to child_process.exec, enabling an attacker to inject arbitrary system commands. Successful exploitation can lead to remote code execution under the server process's privileges. The server constructs and executes shell commands using unvalidated user input directly within command-line strings. This introduces the possibility of shell metacharacter injection (|, >, &&, etc.). An MCP Client can be instructed to execute additional actions for example via indirect prompt injection when asked to read git logs. This issue has been patched in version 2.1.5.

osv:CVE-2025-53107
Complete source record
{
  "id": "b39e0d696c1e89547ff676dc6a437a179d7ad92662d5437c11bffd201af42cf8",
  "url": "https://osv.dev/vulnerability/CVE-2025-53107",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "@cyanheads/git-mcp-server vulnerable to command injection in several tools",
    "summary": "@cyanheads/git-mcp-server is an MCP server designed to interact with Git repositories. Prior to version 2.1.5, there is a command injection vulnerability caused by the unsanitized use of input parameters within a call to child_process.exec, enabling an attacker to inject arbitrary system commands. Successful exploitation can lead to remote code execution under the server process's privileges. The server constructs and executes shell commands using unvalidated user input directly within command-line strings. This introduces the possibility of shell metacharacter injection (|, >, &&, etc.). An MCP Client can be instructed to execute additional actions for example via indirect prompt injection when asked to read git logs. This issue has been patched in version 2.1.5.",
    "evidence": "osv:CVE-2025-53107",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2025-53107",
      "aliases": [
        "CVE-2025-53107",
        "GHSA-3q26-f695-pp76"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/cyanheads/git-mcp-server",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "0dbd6995ccdf76ab770b58013034365b2d06c4d9"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.1.5"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "0dbd6995ccdf76ab770b58013034365b2d06c4d9"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "0dbd6995ccdf76ab770b58013034365b2d06c4d9"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v2.1.5"
                  },
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.1.5"
                      }
                    ],
                    "source": "DESCRIPTION"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v2.1.4",
            "v2.1.3",
            "v2.1.2",
            "v2.1.1",
            "v2.1.0",
            "v2.0.15",
            "v2.0.14",
            "v2.0.12",
            "v2.0.11",
            "v2.0.10",
            "v2.0.9",
            "v2.0.8",
            "v2.0.7",
            "v2.0.6",
            "v2.0.4",
            "v2.0.3",
            "v2.0.2",
            "v2.0.1",
            "v2.0.0",
            "v1.2.4",
            "v1.2.3",
            "1.2.0",
            "v1.1.1",
            "v1.1.0",
            "v1.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-53107.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:50.802803827Z",
      "provider": "osv",
      "references": [
        "https://github.com/cyanheads/git-mcp-server/releases/tag/v2.1.5",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/53xxx/CVE-2025-53107.json",
        "https://github.com/cyanheads/git-mcp-server/security/advisories/GHSA-3q26-f695-pp76",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-53107",
        "https://github.com/cyanheads/git-mcp-server/commit/0dbd6995ccdf76ab770b58013034365b2d06c4d9"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-77"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/53xxx/CVE-2025-53107.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-53107",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 519300,
  "published_at": "2025-07-01T17:55:30.726+00:00"
}