gitlab-mcp-server
CVE-2026-44895
CRITICAL
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAttacker identifies SSE-enabled target on network
-
DeliverySends GET /sse to establish session
-
ExploitReceives session UUID in SSE event stream
-
InstallCrafts JSON-RPC tools/call payload with destructive operation (delete_repository, push_files, etc.)
-
C2Posts to /messages?sessionId=<UUID> without authentication header
-
ExecuteServer proxies request to GitLab API using operator's PAT
-
ImpactDestructive action executes with operator's privileges
-
Step 8Attacker repeats for additional operations or data exfiltration
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Authentication required for critical functions
MITRE ATT&CK
1 technique across 1 tactic: Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The vulnerability is exploitable ONLY when the USE_SSE environment variable is explicitly set to true, activating the SSE HTTP transport feature documented in the project README. Once this precondition is met, no further barriers exist: no authentication tokens are required, no user interaction is needed, no special GitLab permissions beyond those granted to the operator's Personal Access Token, and no non-default Node.js or network configurations are necessary. The default httpServer.listen() behavior binds to 0.0.0.0 (all network interfaces), making the service accessible from any network route to the host-LAN peers, internet-exposed cloud instances, or VPN-connected clients. The wildcard Access-Control-Allow-Origin header imposes zero origin restrictions, enabling cross-origin exploitation from any web page loaded in the operator's browser during server runtime. Exploitation is NOT limited by the Node.js runtime version, operating system, or GitLab instance configuration-the flaw exists purely in the MCP server's transport layer. Operators who use only the default stdio transport (USE_SSE unset or false) are not affected. The structural defect is that enabling a documented, README-promoted feature directly exposes an unauthenticated RPC gateway with no compensating controls or startup warnings about the security implications. |
| Impact | Real-world risk is HIGH for the subset of deployments using the SSE transport feature (USE_SSE=true), despite the absence of standardized CVSS scoring. The vendor-proposed CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:L) yields approximately 6.3 Medium, where AT:P (Attack Prerequisites) reflects the need for SSE mode to be enabled-but this substantially underrepresents actual risk for affected deployments. Once the precondition is met, exploitation requires zero authentication, zero user interaction, and trivial attack complexity (AC:L). The impact scope includes confidentiality and integrity of all GitLab resources accessible to the operator's PAT, with concrete destructive operations (delete_repository, push_files, update_repository_settings) confirmed in the proof-of-concept. The wildcard CORS policy creates a browser-based cross-site attack vector with no user interaction beyond visiting an attacker-controlled webpage while the server runs. No EPSS or KEV data is available as this is a newly disclosed 2026 CVE, but the existence of a working PoC in the GitHub advisory and the trivial exploitation path (two curl commands) significantly elevate practical risk. The advisory confirms patch availability in version 0.6.0, providing clear remediation. Organizations should prioritize this if SSE mode is deployed, particularly on cloud instances or any non-loopback-bound configurations. The Medium aggregate CVSS reflects statistical prevalence assumptions; for operators who enabled the documented SSE feature, this is a critical authentication bypass with confirmed exploit path. |
| Exploit ScenarioDerived | An attacker on the same network as a cloud-deployed gitlab-mcp-server instance (or any remote attacker if the default 0.0.0.0 bind is exposed via cloud security group misconfiguration) connects to the SSE endpoint with a simple curl command, receives a session UUID, then iterates through destructive GitLab operations by posting JSON-RPC tool invocations to the unauthenticated /messages endpoint. Within minutes, the attacker deletes critical repositories using delete_repository, exfiltrates proprietary code via get_repository, and modifies CI/CD pipeline configurations with update_repository_settings-all actions authenticated to GitLab using the legitimate operator's Personal Access Token. Alternatively, an attacker embeds a malicious JavaScript payload on a compromised or attacker-controlled website; when the gitlab-mcp-server operator visits the page in their browser while the server is running, the wildcard CORS policy allows the script to establish an SSE connection via fetch() and silently execute GitLab API mutations in the background without any visible user interaction. The proof-of-concept code provided in the advisory demonstrates both vectors and requires no specialized tooling or exploit development-only HTTP client access to the exposed port. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 09, 2026
Unauthenticated remote access to GitLab API operations via gitlab-mcp-server's SSE transport allows attackers to execute all 86 exposed GitLab management tools-including repository deletion, file modification, and configuration changes-using the operator's Personal Access Token. When configured with USE_SSE=true (a documented feature), the Node.js server binds to 0.0.0.0 with wildcard CORS headers, enabling both network-adjacent attackers and malicious web pages to invoke destructive operations without credentials. Public exploit code demonstrates the attack path from initial SSE connection through authenticated GitLab API calls. Patch version 0.6.0 addresses the authentication bypass per GitHub advisory GHSA-8jr5-6gvj-rfpf.
RemediationAI
Upgrade to gitlab-mcp-server version 0.6.0 or later immediately, as confirmed by GitHub advisory GHSA-8jr5-6gvj-rfpf (https://github.com/yoda-digital/mcp-gitlab-server/security/advisories/GHSA-8jr5-6gvj-rfpf). If immediate patching is not feasible, disable the SSE transport by unsetting the USE_SSE environment variable or setting it to false-this eliminates the vulnerable HTTP server entirely while retaining stdio transport functionality. For deployments that require SSE mode before upgrading, implement network-layer compensating controls: bind the service exclusively to 127.0.0.1 using firewall rules or reverse proxy configuration (note: this does NOT mitigate the browser-based CORS attack vector if operators browse untrusted sites while the server runs), restrict inbound access to the listening port (default 3000) to specific trusted source IPs via host firewall or security group rules, and deploy a reverse proxy with authentication (nginx with HTTP Basic Auth or OAuth2 Proxy) in front of the SSE endpoints-be aware this adds operational complexity and a new component to the trust boundary. All workarounds carry trade-offs: localhost binding breaks legitimate remote client use cases, IP allowlists require maintenance and break dynamic environments, and reverse proxies introduce latency and potential misconfiguration risks. The vendor-released patch in 0.6.0 is the only complete remediation that addresses both network and browser-based attack vectors per the four-point fix plan detailed in the advisory.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability exists in the Server-Sent Events (SSE) HTTP transport layer of gitlab-mcp-server (npm package @yoda.digital/gitlab-mcp-server), a Model Context Protocol server that exposes 86 GitLab administrative tools via JSON-RPC. The affected component (src/transport.ts) implements a stateful SSE connection handler that proxies tool invocations to the GitLab API using the operator's GITLAB_PERSONAL_ACCESS_TOKEN environment variable. The root cause is CWE-306 (Missing Authentication for Critical Function): the httpServer.listen() call defaults to binding on all network interfaces (0.0.0.0) without implementing any authentication mechanism on the GET /sse or POST /messages?sessionId=<UUID> endpoints. The wildcard Access-Control-Allow-Origin header further enables cross-origin exploitation from browser contexts. The architecture conflates transport-layer security (which is absent) with backend authentication (the GitLab PAT), creating an unauthenticated RPC gateway to privileged GitLab operations. The maintainers acknowledged the gap via a SAML/OAuth3 roadmap item but shipped the SSE feature without interim protective controls.
Know when Node.js gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Primary rating from Vendor (https://github.com/yoda-digital/mcp-gitlab-server) · only source for this CVE.
CVSS VectorVendor: https://github.com/yoda-digital/mcp-gitlab-server
Lifecycle Timeline
2DescriptionCVE.org
SSE Transport Has No Authentication and Wildcard CORS, Exposing All 86 GitLab Tools Including Destructive Operations
A review of mcp-gitlab-server at commit 80a7b4cf3fba6b55389c0ef491a48190f7c8996a uncovered that the SSE HTTP transport - advertised in the README and comparison table as a differentiating feature - runs with no authentication and wildcard CORS on every endpoint. The maintainers' own roadmap confirms auth is a known gap.
When USE_SSE=true, the HTTP server in src/transport.ts sets:
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', 'GET, POST');
res.setHeader('Access-Control-Allow-Headers', 'Content-Type');The httpServer.listen(port) call at line 97 passes no host argument - Node.js defaults to 0.0.0.0, binding on all interfaces. Two endpoints are exposed with no credential check:
GET /sse- opens an SSE connection, returns a session endpoint URLPOST /messages?sessionId=<id>- sends MCP messages to the server using the loadedGITLAB_PERSONAL_ACCESS_TOKEN
Any caller who can reach the port - LAN, cloud instance, or via the browser-tab vector the wildcard CORS enables - gets full access to all 86 tools the server exposes using the operator's GitLab PAT. That includes delete_repository, delete_group, push_files, create_merge_request, update_repository_settings, and any other tool the server exposes. The PAT doesn't leave the process, but every API call it backs is available to the unauthenticated caller.
The wildcard CORS makes the browser-tab vector direct: any web page the operator visits while the server is running can open an SSE connection and make tool calls via cross-origin fetch. No user interaction beyond visiting the page.
PoC - reproduces from the documented USE_SSE=true configuration:
# Step 1: connect SSE and capture the session endpoint
curl -N http://localhost:3000/sse &
# Output includes: event: endpoint
# data: /messages?sessionId=<UUID>
# Step 2: call any tool - no auth header needed
curl -X POST "http://localhost:3000/messages?sessionId=<UUID>" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_repository",
"arguments": {"project_id": "target-org/private-repo"}
}
}'
# Returns repository data using the operator's GitLab PAT
# Same path works for delete_repository, push_files, etc.Root cause
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. Auth isn't fail-opening on a missing config - there is no auth check at any code path on either /sse or /messages?sessionId=....
Auth boundary violated
Trust-domain boundary - untrusted cross-origin browser context (and any unauthenticated network caller) crossing into the trusted server-state-mutating GitLab API surface that the operator's PAT backs. Respected-here: nothing. The transport carries no Authorization check, no origin allowlist, no session-binding to the originating client, and no host restriction. Ignored-there: the SSE handler at src/transport.ts accepts an arbitrary Origin (since Access-Control-Allow-Origin: *), opens a session, and the matching POST /messages?sessionId=... proxies tool calls - including delete_repository, push_files, update_repository_settings - to the GitLab API using the operator's PAT. Any web page the operator visits while the server runs can drive the full 86-tool surface via cross-origin fetch.
The roadmap in README.md at line 190 includes - [ ] SAML/OAuth3 authentication - confirming the maintainers are already tracking this gap. The issue is disclosure of impact in the interim: operators who follow the README's SSE setup instructions and don't see an auth requirement in the docs may reasonably assume the transport is safe to use on a network-accessible host.
CVSS 4.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 - ~6.3 (Medium). AT:P reflects the USE_SSE=true precondition. When that precondition is met, the effective severity for those deployments is High - full GitLab PAT access without authentication. The Medium CVSS is the aggregate across all deployments; for any operator who has activated SSE mode (which the README promotes as a feature), the finding is functionally High.
Fix - four concrete changes:
- Require
MCP_GITLAB_AUTH_TOKENas a startup precondition whenUSE_SSE=true. If the env var is unset, the server should exit with a clear message before the HTTP server starts:
if (process.env.USE_SSE === 'true') {
if (!process.env.MCP_GITLAB_AUTH_TOKEN) {
console.error(
'ERROR: MCP_GITLAB_AUTH_TOKEN must be set when USE_SSE=true. ' +
'SSE transport without authentication exposes all GitLab tools to unauthenticated callers.'
);
process.exit(1);
}
}The token check in src/transport.ts validates it on every request:
const authToken = process.env.MCP_GITLAB_AUTH_TOKEN;
if (authToken) {
const provided = req.headers['authorization']?.replace(/^Bearer /, '');
if (provided !== authToken) {
res.writeHead(401);
res.end(JSON.stringify({ error: 'Unauthorized' }));
return;
}
}- Bind to
127.0.0.1by default for the SSE transport rather than0.0.0.0. An explicitMCP_GITLAB_HOST=0.0.0.0flag with a startup banner warning can expose it to the network for operators who need that - but the safe default should be loopback-only. - Replace the wildcard
Access-Control-Allow-Origin: *with a localhost-only default. When network exposure is intentional (explicit flag + auth token set), an explicitCORS_ORIGINSallowlist should be required. - The SAML/OAuth3 roadmap item is the right long-term direction. In the interim - before that ships - the three changes above are entirely in the existing codebase with no new dependencies.
---
No prior security advisories, CVEs, or public security issues exist for this package - a search of the repository issue list and npm advisory database did not yield any duplicate issues.
Executive ViewAI
CVE-2026-44895 exploits gitlab-mcp-server to enable unauthenticated attackers to perform destructive GitLab operations-including repository deletion and configuration changes-through the server's SSE transport when USE_SSE=true is enabled. Organizations running this component with SSE enabled face immediate risk of data loss and operational disruption without authentication barriers. This vulnerability directly compromises GitLab infrastructure integrity and requires urgent remediation.
Immediately disable USE_SSE=true environment variable; restrict network access to gitlab-mcp-server port via firewall rules to trusted internal hosts only; remove or restrict wildcard CORS headers ('*') to specific authorized origins; rotate all GitLab Personal Access Tokens used by the server; monitor GitLab audit logs for unauthorized API activity. Apply vendor patch (version 0.6.0 or later) as primary remediation once deployment is feasible.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Affected Products (CPE)CVE.org
Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation
A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could
FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote
Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour
Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t
Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete
Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc
An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi
Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin
A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond
GHSA-8jr5-6gvj-rfpf
NVD
CVE.org
EPSS
Exploit-DB