high · 7.5CVE-2026-47427Jul 28, 2026

CVE-2026-47427: github-mcp-server Nil Pointer Dereference DoS in completion/complete Handler

Rohit Hatagale
AI Security Researcher, SecureLayer7

Any unauthenticated client can crash GitHub's official MCP Server by sending a malformed completion request with a missing ref field, triggering an unrecoverable Go runtime panic before any auth…

Packagegithub.com/github/github-mcp-server
Ecosystemgo
Affected< 1.1.0
Fixed in1.1.0
CVE-2026-47427: github-mcp-server Nil Pointer Dereference DoS in completion/complete Handler

The problem

The CompletionsHandler function in pkg/github/server.go:198 unconditionally dereferences params.Ref with no nil check. A client that omits the ref field (or sends empty params) in a completion/complete JSON-RPC request causes an immediate Go runtime panic.

The panic fires before authentication or token validation, so no valid credentials are required. The process exits and cannot recover, making this a complete denial of service.

Proof of concept

A working proof-of-concept for CVE-2026-47427 in github.com/github/github-mcp-server, with the exact payload below.

json
{"jsonrpc":"2.0","id":2,"method":"completion/complete","params":{"argument":{"name":"x","value":"y"}}}

The completion/complete handler reads params.Ref assuming the field is always present. When it is nil, Go panics with runtime error: invalid memory address or nil pointer dereference at server.go:198. The fix introduced in PR #2502 (commit c88d2ec) adds an early guard: if params == nil || params.Ref == nil, the handler returns a graceful error instead of proceeding.

The root cause is CWE-476: missing nil validation on a pointer field that the MCP protocol does not require clients to supply.

The fix

Upgrade to github-mcp-server v1.1.0 or later. The patch (PR #2502, commit c88d2ec) adds a nil check for both params and params.Ref at the top of CompletionsHandler, returning an error response instead of panicking. No configuration change is needed beyond the version upgrade.

Reporter not attributed.

References: [1][2][3][4][5]

Related research