CVE-2026-48529: GitHub MCP Server Lockdown Mode Singleton Vulnerability

MODERATE
Advisory Identifier: GHSA-pjp5-fpmr-3349
CVSS 6.0
CWE-284
Published
Advisory Summary

CVE-2026-48529 is a MODERATE (CVSS 6.0) lockdown mode singleton vulnerability (CWE-284: Improper Access Control) affecting GitHub MCP Server libraries in the Go ecosystem. The issue involves lockdown mode singleton in http server causes cross-user graphql client confusion. Remediation is available by upgrading affected packages to version 1.1.2.

CVE-2026-48529 at a Glance

CVE Identifier CVE-2026-48529
GHSA Identifier GHSA-pjp5-fpmr-3349
Severity MODERATE
CVSS v3.1 Base Score 6.0
CWE Classification CWE-284: Improper Access Control
Affected Product GitHub MCP Server
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2026-48529

To remediate this vulnerability, upgrade all affected GitHub MCP Server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/github/github-mcp-server fixed: 1.1.2
Upgrade github.com/github/github-mcp-server to 1.1.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/github/github-mcp-server

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-48529, inspect your project dependencies for GitHub MCP Server:

inspect dependencies for github.com/github/github-mcp-server

Analyze the terminal output to locate any version of GitHub MCP Server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In GitHub MCP Server, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary When running in HTTP mode with --lockdown-mode enabled, the RepoAccessCache is implemented as a process-global singleton initialized with the first authenticated user's GraphQL client. All subsequent requests from different users share this singleton and their lockdown-related GraphQL queries are executed using the first user's credentials. The singleton is never updated to reflect later users' tokens. ### Details The singleton is defined in pkg/lockdown/lockdown.go: ```go var ( instance *RepoAccessCache instanceMu sync.Mutex ) func GetInstance(client *githubv4.Client, opts ...RepoAccessOption) *RepoAccessCache { instanceMu.Lock() defer instanceMu.Unlock() if instance == nil { instance = &RepoAccessCache{ client: client, // only stored on first call } } return instance // subsequent callers receive the same object regardless of their client } ``` In HTTP mode, pkg/github/dependencies.go calls this per request: ```go func (d *RequestDeps) GetRepoAccessCache(ctx context.Context) (*lockdown.RepoAccessCache, error) { gqlClient, err := d.GetGQLClient(ctx) // creates client with request's token ... instance := lockdown.GetInstance(gqlClient, d.RepoAccessOpts...) // gqlClient is silently dropped if singleton already exists return instance, nil } ``` The singleton's internal client field is never updated after the first initialization. All lockdown GraphQL queries that check repository access and visibility (queryRepoAccessInfo, called by IsSafeContent) run under the first authenticated user's token for the lifetime of the process. IsSafeContent is called in at least six places across pkg/github/issues.go and pkg/github/pullrequests.go to decide whether to trust or sanitize content from external contributors. ### PoC The following program demonstrates that two distinct GraphQL clients produce the same singleton pointer, confirming that the second client is discarded: ```go package main import ( "fmt" "net/http" "github.com/github/github-mcp-server/pkg/lockdown" "github.com/shurcooL/githubv4" ) func main() { httpClientA := &http.Client{} httpClientB := &http.Client{} gqlClientA := githubv4.NewEnterpriseClient("https://api.github.com/graphql", httpClientA) gqlClientB := githubv4.NewEnterpriseClient("https://api.github.com/graphql", httpClientB) fmt.Printf("gqlClientA (user A token): %p\n", gqlClientA) fmt.Printf("gqlClientB (user B token): %p\n", gqlClientB) fmt.Printf("clients are different objects: %v\n\n", gqlClientA != gqlClientB) instanceForA := lockdown.GetInstance(gqlClientA) instanceForB := lockdown.GetInstance(gqlClientB) fmt.Printf("lockdown instance returned for user A: %p\n", instanceForA) fmt.Printf("lockdown instance returned for user B: %p\n", instanceForB) fmt.Printf("same singleton returned for both users: %v\n", instanceForA == instanceForB) } ``` Output: ``` gqlClientA (user A token): 0x400044070 gqlClientB (user B token): 0x400044078 clients are different objects: true lockdown instance returned for user A: 0x400002ecc0 lockdown instance returned for user B: 0x400002ecc0 same singleton returned for both users: true ``` <img width="1642" height="450" alt="image" src="https://github.com/user-attachments/assets/bec46420-9ba7-458e-8710-62f951cb836a" /> ### Impact This affects deployments running the HTTP server with --lockdown-mode, which is the intended configuration for multi-user scenarios such as GitHub Copilot's managed MCP endpoint. Three concrete consequences: First, the ViewerLogin field in cache entries always reflects the first authenticated user's identity. The IsSafeContent check `repoInfo.ViewerLogin == strings.ToLower(username)` compares this stale value against each subsequent user's login, producing incorrect results for all users except the first. Second, repository visibility and collaborator access data stored in the cache is evaluated through the first user's token. If user A cannot see a private repository but user B can (or vice versa), the cached isPrivate and hasPushAccess values will reflect user A's view of that repository, causing IsSafeContent to return wrong decisions for user B. In lockdown mode, a wrong true result means potentially injected content from untrusted external contributors is passed to the model without sanitization. Third, if the first user's token is revoked or expires, all subsequent lockdown GraphQL queries fail with authentication errors. Since getRepoAccessInfo propagates these errors, IsSafeContent returns an error for every request, breaking lockdown protection for all users until the process is restarted.

CVE-2026-48529 Affected GitHub MCP Server Versions

1 component(s)
Fixed Versions:
1.1.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/github/github-mcp-server
Go
≥ 0.22.0
< 1.1.2
1.1.2

References

Frequently Asked Questions

What is CVE-2026-48529?
CVE-2026-48529 is a security vulnerability in GitHub MCP Server involving Lockdown mode singleton in HTTP server causes cross-user GraphQL client confusion under CWE-284: Improper Access Control.
Which GitHub MCP Server versions are affected?
Affected versions include releases prior to 1.1.2 across affected packages: github.com/github/github-mcp-server.
What version fixes CVE-2026-48529?
Upgrading to 1.1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/github/github-mcp-server affected?
Yes, github.com/github/github-mcp-server is affected in releases prior to 1.1.2. Upgrade your dependency to 1.1.2 or later.
What is the CVSS score of CVE-2026-48529?
CVE-2026-48529 has a CVSS v3.1 base score of 6.0 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:L.
What CWE is associated with CVE-2026-48529?
CVE-2026-48529 is classified under CWE-284: Improper Access Control (The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.).
How can I check Go dependencies for CVE-2026-48529?
Run the dependency tree command: 'inspect dependencies for github.com/github/github-mcp-server'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-pjp5-fpmr-3349",
  "modified" : "2026-06-25T21:32:09Z",
  "published" : "2026-06-25T21:32:09Z",
  "aliases" : [ "CVE-2026-48529" ],
  "summary" : "GitHub MCP Server: Lockdown mode singleton in HTTP server causes cross-user GraphQL client confusion",
  "details" : "### Summary\n\nWhen running in HTTP mode with --lockdown-mode enabled, the RepoAccessCache is implemented as a process-global singleton initialized with the first authenticated user's GraphQL client. All subsequent requests from different users share this singleton and their lockdown-related GraphQL queries are executed using the first user's credentials. The singleton is never updated to reflect later users' tokens.\n\n### Details\n\nThe singleton is defined in pkg/lockdown/lockdown.go:\n\n```go\nvar (\n    instance   *RepoAccessCache\n    instanceMu sync.Mutex\n)\n\nfunc GetInstance(client *githubv4.Client, opts ...RepoAccessOption) *RepoAccessCache {\n    instanceMu.Lock()\n    defer instanceMu.Unlock()\n    if instance == nil {\n        instance = &RepoAccessCache{\n            client: client,  // only stored on first call\n        }\n    }\n    return instance  // subsequent callers receive the same object regardless of their client\n}\n```\n\nIn HTTP mode, pkg/github/dependencies.go calls this per request:\n\n```go\nfunc (d *RequestDeps) GetRepoAccessCache(ctx context.Context) (*lockdown.RepoAccessCache, error) {\n    gqlClient, err := d.GetGQLClient(ctx)  // creates client with request's token\n    ...\n    instance := lockdown.GetInstance(gqlClient, d.RepoAccessOpts...)\n    // gqlClient is silently dropped if singleton already exists\n    return instance, nil\n}\n```\n\nThe singleton's internal client field is never updated after the first initialization. All lockdown GraphQL queries that check repository access and visibility (queryRepoAccessInfo, called by IsSafeContent) run under the first authenticated user's token for the lifetime of the process.\n\nIsSafeContent is called in at least six places across pkg/github/issues.go and pkg/github/pullrequests.go to decide whether to trust or sanitize content from external contributors.\n\n### PoC\n\nThe following program demonstrates that two distinct GraphQL clients produce the same singleton pointer, confirming that the second client is discarded:\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"net/http\"\n    \"github.com/github/github-mcp-server/pkg/lockdown\"\n    \"github.com/shurcooL/githubv4\"\n)\n\nfunc main() {\n    httpClientA := &http.Client{}\n    httpClientB := &http.Client{}\n    gqlClientA := githubv4.NewEnterpriseClient(\"https://api.github.com/graphql\", httpClientA)\n    gqlClientB := githubv4.NewEnterpriseClient(\"https://api.github.com/graphql\", httpClientB)\n\n    fmt.Printf(\"gqlClientA (user A token): %p\\n\", gqlClientA)\n    fmt.Printf(\"gqlClientB (user B token): %p\\n\", gqlClientB)\n    fmt.Printf(\"clients are different objects: %v\\n\\n\", gqlClientA != gqlClientB)\n\n    instanceForA := lockdown.GetInstance(gqlClientA)\n    instanceForB := lockdown.GetInstance(gqlClientB)\n\n    fmt.Printf(\"lockdown instance returned for user A: %p\\n\", instanceForA)\n    fmt.Printf(\"lockdown instance returned for user B: %p\\n\", instanceForB)\n    fmt.Printf(\"same singleton returned for both users: %v\\n\", instanceForA == instanceForB)\n}\n```\n\nOutput:\n\n```\ngqlClientA (user A token): 0x400044070\ngqlClientB (user B token): 0x400044078\nclients are different objects: true\n\nlockdown instance returned for user A: 0x400002ecc0\nlockdown instance returned for user B: 0x400002ecc0\nsame singleton returned for both users: true\n```\n\n<img width=\"1642\" height=\"450\" alt=\"image\" src=\"https://github.com/user-attachments/assets/bec46420-9ba7-458e-8710-62f951cb836a\" />\n\n\n### Impact\n\nThis affects deployments running the HTTP server with --lockdown-mode, which is the intended configuration for multi-user scenarios such as GitHub Copilot's managed MCP endpoint.\n\nThree concrete consequences:\n\nFirst, the ViewerLogin field in cache entries always reflects the first authenticated user's identity. The IsSafeContent check `repoInfo.ViewerLogin == strings.ToLower(username)` compares this stale value against each subsequent user's login, producing incorrect results for all users except the first.\n\nSecond, repository visibility and collaborator access data stored in the cache is evaluated through the first user's token. If user A cannot see a private repository but user B can (or vice versa), the cached isPrivate and hasPushAccess values will reflect user A's view of that repository, causing IsSafeContent to return wrong decisions for user B. In lockdown mode, a wrong true result means potentially injected content from untrusted external contributors is passed to the model without sanitization.\n\nThird, if the first user's token is revoked or expires, all subsequent lockdown GraphQL queries fail with authentication errors. Since getRepoAccessInfo propagates these errors, IsSafeContent returns an error for every request, breaking lockdown protection for all users until the process is restarted.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/github/github-mcp-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.22.0"
      }, {
        "fixed" : "1.1.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/github/github-mcp-server/security/advisories/GHSA-pjp5-fpmr-3349"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/github/github-mcp-server"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-284" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-25T21:32:09Z",
    "nvd_published_at" : null
  }
}