{
  "schema_version": "1.6.0",
  "id": "ACVE-2026-0216",
  "aliases": [],
  "published": "2025-05-26T00:00:00Z",
  "firstReported": {
    "date": "2025-05-26",
    "url": "https://invariantlabs.ai/blog/mcp-github-vulnerability",
    "publisher": "Invariant Labs"
  },
  "modified": "2026-09-25T00:00:00Z",
  "summary": "Private repositories are published in a public pull request when Claude 4 Opus in Claude Desktop, with the GitHub MCP server on Always Allow, reads an issue planted in the user's public repository.",
  "details": "## What\n\nInvariant Labs (2025-05-26) planted an issue in a user's public repository. Asked to look at open issues, the agent read the user's private repositories and published their contents, including salary details, in a public pull request. Invariant states this is \"not a flaw in the GitHub MCP server code itself\"; the token reached public and private repositories alike.\n\n## Detection\n\nThe lockfile sees the GitHub MCP server and the approval mode; it sees neither the token's repository scope nor Claude Desktop's Always Allow choice.\n\n## Fix\n\nUse a fine-grained token limited to the repositories in use; keep confirmation on for write tools; consider the server's --read-only and --lockdown-mode flags. The post also recommends Invariant Guardrails and MCP-scan, which are Invariant's own products.\n",
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/github/github-mcp-server"
      },
      "ranges": [
        {
          "type": "SEMVER",
          "events": [
            {
              "introduced": "0"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "type": "ARTICLE",
      "url": "https://invariantlabs.ai/blog/mcp-github-vulnerability"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/github/github-mcp-server"
    },
    {
      "type": "EXPLOIT",
      "url": "https://github.com/ukend0464/pacman/issues/1"
    },
    {
      "type": "EVIDENCE",
      "url": "https://github.com/ukend0464/pacman/pull/2"
    }
  ],
  "database_specific": {
    "severity": "HIGH",
    "acve": {
      "specVersion": 1,
      "status": "candidate",
      "kind": "behavioural",
      "vulnClasses": [
        "prompt-injection-to-tool",
        "data-exfiltration"
      ],
      "cwe": [
        "CWE-1427",
        "CWE-359"
      ],
      "taxonomy": {
        "owasp_llm": [
          "LLM01"
        ],
        "owasp_asi": [
          "ASI01",
          "ASI03",
          "ASI02"
        ],
        "atlas": [
          "AML.T0093",
          "AML.T0051.001",
          "AML.T0086"
        ]
      },
      "noCveReason": "the reporter states it is not a flaw in the server code; no CVE was assigned",
      "threat": {
        "attacker": "content-author",
        "vector": "prompt-injection",
        "outcome": "exfiltration"
      },
      "evidence": [
        {
          "kind": "incident",
          "benchmark": "GitHub MCP toxic-flow demonstration",
          "attack": "malicious public issue leads to private-repository reads and a public pull request",
          "harness": "claude-desktop",
          "model": {
            "id": "Claude 4 Opus"
          },
          "setup": {
            "tools": [
              "GitHub MCP server issue read",
              "GitHub MCP server repository read",
              "GitHub MCP server pull-request create"
            ],
            "approval": "allowlist",
            "defences": []
          },
          "date": "2025-05-26",
          "url": "https://invariantlabs.ai/blog/mcp-github-vulnerability",
          "note": "researcher demonstration on real repositories; no rate"
        }
      ],
      "matcher": {
        "all": [
          {
            "some": "mcpServers",
            "where": {
              "any": [
                {
                  "field": "package",
                  "op": "in",
                  "value": [
                    "pkg:oci/ghcr.io/github/github-mcp-server",
                    "pkg:golang/github.com/github/github-mcp-server"
                  ]
                },
                {
                  "field": "urlHost",
                  "op": "eq",
                  "value": "api.githubcopilot.com"
                }
              ]
            }
          },
          {
            "field": "approval",
            "op": "in",
            "value": [
              "never",
              "allowlist"
            ]
          }
        ]
      },
      "fix": {
        "summary": "Scope the GitHub token to the repositories in use and keep write tools behind confirmation.",
        "actions": [
          {
            "type": "reconfigure",
            "target": "mcp:github-mcp-server:env.GITHUB_PERSONAL_ACCESS_TOKEN",
            "to": "fine-grained token limited to selected repositories",
            "why": "The agent cannot read repositories the token cannot reach.",
            "owner": "operator"
          },
          {
            "type": "reconfigure",
            "target": "mcp:github-mcp-server:args",
            "to": "--read-only or --lockdown-mode",
            "why": "Read-only mode removes the write channel; lockdown mode withholds public content from authors without push access. GitHub documents lockdown mode as best-effort, not an authorization boundary.",
            "owner": "operator"
          },
          {
            "type": "reconfigure",
            "target": "agent.approval",
            "to": "ask",
            "why": "Pull-request and push calls are confirmed by a person.",
            "owner": "operator"
          },
          {
            "type": "reconfigure",
            "target": "github.github-mcp-server.lockdownMode",
            "to": "on by default for public repository content",
            "why": "Recommended: the injection arrived as an issue in a public repository.",
            "owner": "tool-provider"
          },
          {
            "type": "reconfigure",
            "target": "anthropic.claude-desktop.alwaysAllow",
            "to": "tools that publish content, such as opening a pull request, still confirmed",
            "why": "Recommended: the private data left through a public pull request opened without a prompt.",
            "owner": "harness-vendor"
          }
        ]
      },
      "exposure": {
        "harness": {
          "value": "Claude Desktop",
          "any": false,
          "status": "confirmed",
          "source": "https://invariantlabs.ai/blog/mcp-github-vulnerability"
        },
        "model": {
          "value": "Claude 4 Opus",
          "any": false,
          "status": "confirmed",
          "source": "https://invariantlabs.ai/blog/mcp-github-vulnerability"
        },
        "goal": {
          "value": "Have a look at the open issues in <user>/public-repo",
          "stated": true,
          "status": "confirmed",
          "source": "https://invariantlabs.ai/blog/mcp-github-vulnerability"
        },
        "tools": {
          "value": "The official GitHub MCP server with a personal access token spanning the user's public and private repositories; its issue-reading, repository-reading and pull-request-creating tools",
          "status": "confirmed",
          "source": "https://invariantlabs.ai/blog/mcp-github-vulnerability"
        },
        "approval": {
          "value": "The user had chosen Claude Desktop's Always Allow policy for tool calls, which the post says many users opt for",
          "mode": "always-allow",
          "status": "confirmed",
          "source": "https://invariantlabs.ai/blog/mcp-github-vulnerability"
        },
        "inputControl": "content-author",
        "agentAction": "The agent reads the planted issue, pulls the user's private repositories into context and opens a public pull request containing their contents.",
        "harm": "data-exfiltration",
        "divergence": "goal-hijacked",
        "reach": {
          "value": "The user's private GitHub repositories",
          "kinds": [
            "private-repositories"
          ],
          "status": "confirmed",
          "source": "https://invariantlabs.ai/blog/mcp-github-vulnerability"
        },
        "condition": {
          "value": "When a planted issue is read with a token that spans public and private repositories",
          "status": "confirmed",
          "source": "https://invariantlabs.ai/blog/mcp-github-vulnerability"
        }
      },
      "occurrence": {
        "basis": "demonstrated",
        "reportedBy": "researcher"
      },
      "exploitation": {
        "status": "demonstrated",
        "checkedAt": "2026-09-21T00:00:00Z",
        "sources": [
          {
            "url": "https://invariantlabs.ai/blog/mcp-github-vulnerability",
            "type": "research",
            "note": "researcher demonstration; no in-the-wild use reported"
          }
        ],
        "kev": {
          "listed": false
        }
      },
      "cveBoundary": "combination",
      "reproducibility": {
        "status": "partial",
        "axesComplete": true,
        "componentsObtainable": null,
        "triggerPublished": true,
        "observableStated": true,
        "demonstrated": "researcher-demonstrated",
        "missing": [
          "model availability not checked (no registry reference)"
        ]
      },
      "claims": [],
      "severityBasis": "harm-reach"
    }
  }
}
