GitLab MCP Server lets an AI agent talk directly to GitLab. Prior to 0.6.0, the HTTP transport in src/transport.ts ships with no authentication layer at all and a wildcard Access-Control-Allow-Origin: * on every response. The structural defect is that the SSE server stands up a stateful, mutation-capable RPC endpoint that is backed by the operator's GITLAB_PERSONAL_ACCESS_TOKEN without any inbound credential check, then advertises itself to every cross-origin browser context via the wildcard CORS header. The httpServer.listen(port) call at line 97 also passes no host argument, so the bind defaults to 0.0.0.0 and exposes the auth-less surface on every interface. This vulnerability is fixed in 0.6.0.
The HTTP transport component (src/transport.ts) runs an SSE server implementing stateful, mutating RPC calls that are executed in the context of the configured GITLAB_PERSONAL_ACCESS_TOKEN. The server does not implement any validation of incoming requests (CWE-306 – missing authentication for critical functions). At the same time, each response contains the Access-Control-Allow-Origin: * header, which allows any website in the victim's browser to send cross-origin requests to the endpoint (CWE-942 – overly permissive CORS policy). Additionally, the httpServer.listen(port) call does not pass a host argument, so the server listens by default on 0.0.0.0 and is accessible on all network interfaces of the machine.
An attacker without any credentials can perform arbitrary operations in GitLab with full operator token permissions, including reading and modifying repositories, CI/CD secrets, pipeline configurations, and other resources accessible to that token.
GitLab MCP Server should be updated to version 0.6.0 or later, in which the vulnerability has been fixed. Until an update is performed, it is recommended to restrict access to the MCP server port at the firewall level to trusted sources only and avoid exposing the server on public network interfaces.
GitLab MCP Server (mcp-gitlab-server) in versions before 0.6.0
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X