Junglewise Threat Intelligence

CVE-2026-61568: @zereight/mcp-gitlab DNS rebinding in Streamable HTTP transport

CVE-2026-61568 · Severity: critical · CVSS 9.6 · Published 2026-09-15

Executive brief

@zereight/mcp-gitlab is a Model Context Protocol server that integrates with GitLab APIs and exposes a local HTTP endpoint for clients. An attacker can use DNS rebinding to route a victim's browser to the local MCP listener while spoofing the Host and Origin headers, bypassing the server's assumption that localhost binding provides sufficient isolation. This allows the attacker's web page to initialize MCP sessions and, when a GitLab token is present, list tools and execute GitLab API calls to retrieve sensitive project data such as CI/CD variables.

Technical details

The vulnerability is a DNS rebinding attack (CWE-350) on a local HTTP service. The MCP server binds to 127.0.0.1 by default and creates a StreamableHTTPServerTransport without enabling the TypeScript SDK's built-in DNS-rebinding protections (enableDnsRebindingProtection, allowedHosts, allowedOrigins). Express middleware to validate Host and Origin headers is also absent. An attacker can craft a malicious web page that triggers the victim's browser to make requests to http://127.0.0.1:8082/mcp; via DNS rebinding, the attacker controls the Host and Origin headers sent by the browser, bypassing the localhost boundary. The server accepts these forged headers and processes MCP initialize requests, tool discovery, and GitLab API calls. When REMOTE_AUTHORIZATION=true (a documented deployment mode), token validation blocks unauthenticated tool calls, but authentication failures do not prevent the HTTP boundary violation. If a token is present in browser-suppliable headers or in a reused session, the attacker can list tools and execute API calls to exfiltrate CI/CD variables and other sensitive project data. The proof-of-concept demonstrates successful token forwarding to the GitLab API backend.

Affected products

  • zereight @zereight/mcp-gitlab < 2.1.30

Timeline

  • 2026-07-03: disclosed
  • 2026-07-03: patched: Version 2.1.30 patches the vulnerability
  • 2026-09-15: advisory: GitHub Advisory GHSA-vmp7-252j-cwp7 published

References

Related threats