Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach exposed MCP HTTP transport
-
DeliverySend tool call with malicious X-GitLab-API-URL header
-
ExploitServer accepts unvalidated attacker host
-
ExecutionOutbound fetch attaches victim Private-Token
-
PersistToken delivered to attacker listener
-
ImpactReplay token against real GitLab
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service URL allowlisting, SSRF prevention
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Credential Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires the non-default environment variable ENABLE_DYNAMIC_API_URL=true to be set; only then does the server read the X-GitLab-API-URL request header and use it, after a syntax-only new URL() check with no allowlist, as the base URL for token-bearing outbound calls. The attacker must be able to reach the server's HTTP/SSE transport (the streamable HTTP or SSE handler), and a valid victim Private-Token must be in use so it gets attached to the redirected fetch (the PoC also runs with REMOTE_AUTHORIZATION=true). Limiting factors: default configurations are NOT vulnerable because the dynamic-API-URL flag is off by default; exposure additionally depends on the HTTP transport being network-reachable rather than bound to localhost. |
| Impact | This is a genuine high-priority credential-theft flaw, not an inflated CVSS number. The NVD vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N scores 9.6 (Critical), driven by network reach, low complexity, and a scope change (the victim's GitLab Private-Token crosses from the MCP server to an attacker-controlled system). Note a signal conflict: the GHSA advisory labels this 'High, CVSS 8.5' while quoting the identical vector string, which actually computes to 9.6 - the 8.5 label appears to be an advisory-stage error, so the NVD 9.6 is the mathematically correct figure. Exploitation status: publicly available exploit code exists (a working curl/Python PoC is published in the GHSA), but there is NO CISA KEV listing and NO EPSS score provided, so there is no evidence of active in-the-wild exploitation yet. No SSVC decision data was supplied. The single most important risk-limiting factor is that exploitation requires the non-default environment variable ENABLE_DYNAMIC_API_URL=true; against default deployments the vulnerable code path is inert. Where that flag IS enabled on an internet-reachable HTTP transport, risk is severe because a working PoC exists and the impact is direct theft of a live GitLab API token. |
| Exploit ScenarioDerived | An operator runs @zereight/mcp-gitlab with ENABLE_DYNAMIC_API_URL=true exposing the streamable HTTP/SSE transport. An attacker who can reach that endpoint sends any MCP tool call with the header 'X-GitLab-API-URL: http://attacker-host/api/v4'; the server accepts the syntactically-valid URL without any allowlist check and, on its next outbound call, attaches the victim's Private-Token to a request sent to the attacker's listener. A public PoC (curl + a header-logging HTTP server) demonstrates the token capture, after which the attacker replays the stolen token against the real GitLab instance. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 16, 2026
Server-side request forgery in the @zereight/mcp-gitlab Model Context Protocol server (npm versions 0.0.1 through 2.1.26) allows a caller who can reach the server's HTTP/SSE transport to redirect every outbound GitLab API call to an attacker-controlled host - taking the victim's Private-Token with it - by setting a crafted X-GitLab-API-URL request header. The server accepts that header only when the non-default environment variable ENABLE_DYNAMIC_API_URL=true is set, and it validates the value with a syntax-only new URL() check, applying no allowlist or hostname restriction before the token is attached to the redirected fetch. Publicly available exploit code exists, the flaw is credibly rated as a high-impact credential-theft issue (assessed CVSS 3.1 base of 9.6 with scope change, C:H/I:H), and a vendor fix is available in version 2.1.27, so exposure is limited to deployments that have enabled the dynamic-API-URL option and exposed the transport beyond localhost.
RemediationAI
Upgrade to the vendor-released patch, @zereight/mcp-gitlab version 2.1.27 (release tag v2.1.27), which enforces the host allowlist through resolveTrustedGitLabApiUrl() and adds clear rejection messages in both the download proxy and streamable HTTP paths; the change is shipped in PR #625 (https://github.com/zereight/gitlab-mcp/pull/625) and commit 6ffb4cc70706fd05b1ab80901676bc2998b6db6d. If immediate upgrade is not possible, the most effective compensating control is to leave ENABLE_DYNAMIC_API_URL unset or false (its default) - this fully disables the header-driven URL override and closes the issue, at the cost of losing the multi-tenant dynamic endpoint feature entirely. Where the HTTP/SSE transport does not need to be network-exposed, bind it to localhost or place it behind an authenticated reverse proxy and network ACLs so unprivileged callers cannot inject the X-GitLab-API-URL header; note that this is only a partial mitigation because any caller who legitimately reaches the transport can still supply the header. In patched builds, explicitly set GITLAB_ALLOWED_HOSTS (or a fixed GITLAB_API_URL) to the single trusted GitLab host so any unexpected dynamic value is rejected; side effect is that legitimate multi-host or self-hosted GitLab setups must enumerate their hosts. Regardless of chosen mitigation, rotate any Private-Token that may have been attached to a redirected fetch, since token disclosure to an attacker-controlled host is effectively immediate and irreversible once triggered.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-918 (Server-Side Request Forgery): user-controllable request-header input is used to construct the destination of a server-initiated HTTP request without any host allowlist. gitlab-mcp is an MCP server that exposes GitLab operations to LLM clients over an HTTP transport; when ENABLE_DYNAMIC_API_URL is enabled, both the SSE handler (index.ts around line 11541) and the streamable HTTP handler's parseAuthHeaders path (index.ts around line 11787) read the x-gitlab-api-url header and assign it to the per-request apiUrl variable. The streamable HTTP path only performs new URL(dynamicApiUrl) as a well-formedness check, and neither path constrains the hostname. That apiUrl propagates through getEffectiveApiUrl() into getFetchConfig(), which unconditionally attaches the caller's Private-Token credential to each outbound GitLab API request - so the credential, not merely the request, is exfiltrated to whatever host the attacker names. The upstream fix introduces resolveTrustedGitLabApiUrl(), which rejects hosts that are not registered in GITLAB_ALLOWED_HOSTS or the configured GITLAB_API_URL, and surfaces actionable remediation text in the download-proxy 400 response; a regression test (test/dynamic-api-url-allowlist.test.ts) asserts that the proxy refuses untrusted dynamic hosts and records zero hits on a simulated attacker server. Affected artifact is the npm package @zereight/mcp-gitlab; EUVD lists affected versions as gitlab-mcp 0.0.1, < 2.1.27, with the fix released in 2.1.27.
Know when Gitlab 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
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N
Network-reachable transport (AV:N/AC:L); PR:L because a caller must reach an authenticated HTTP transport; S:C and C:H/I:H as the stolen Private-Token compromises the separate GitLab instance; A:N as no availability impact.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
2DescriptionCVE.org
@zereight/mcp-gitlab is a Model Context Protocol server for GitLab. Starting in version 0.0.1 and prior to version 2.1.27, when the environment variable ENABLE_DYNAMIC_API_URL=true is set, the server reads the X-GitLab-API-URL HTTP request header and uses it as the base URL for all outbound GitLab API calls made within that request. The server validates that the value is a well-formed URL (new URL(dynamicApiUrl)) but applies no allowlist or hostname restriction. The server then attaches the victim's Private-Token to every outbound fetch that uses the redirected URL. Any caller who can reach the HTTP transport can set X-GitLab-API-URL to an attacker-controlled host. The next GitLab API call the server makes delivers the victim's token to that host. Version 2.1.27 contains a patch.
Technical POC Analysis
CWE-918 SSRF.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
The @zereight/mcp-gitlab Model Context Protocol server (npm versions 0.0.1 through 2.1.26) has a critical credential-theft issue: in deployments with ENABLE_DYNAMIC_API_URL=true and the HTTP/SSE transport exposed beyond localhost, a reachable caller can redirect GitLab API calls to an attacker-controlled host and capture the victim's Private-Token. Publicly available exploit code exists, and successful exploitation could expose GitLab repositories, source code, and other sensitive data, creating supply-chain and regulatory risk. Leadership should prioritize locating and remediating exposed instances because the condition is specific but the consequences can be severe.
Apply vendor patch.
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
Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.
An issue has been discovered in GitLab CE/EE affecting all versions starting from 11.9. Rated critical severity (CVSS 10
An issue has been discovered in GitLab CE/EE affecting all versions from 16.1 prior to 16.1.6, 16.2 prior to 16.2.9, 16.
When requests to the internal network for webhooks are enabled, a server-side request forgery vulnerability in GitLab af
Unauthenticated arbitrary file read in GitLab CE/EE lets remote attackers retrieve files from the GitLab server via the
Remote code execution in GitLab CE/EE (all versions from 19.2 before 19.2.8, 19.3 before 19.3.5, and 19.4 before 19.4.2)
The SSH key upload feature (lib/gitlab_keys.rb) in gitlab-shell before 1.7.3, as used in GitLab 5.0 before 5.4.1 and 6.x
A vulnerability in GitLab CE/EE affecting all versions from 11.10 prior to 15.1.6, 15.2 to 15.2.4, 15.3 to 15.3.2 allows
The Ruby SAML library is for implementing the client side of a SAML authorization. Rated critical severity (CVSS 9.8), t
Remote code execution in GitLab CE/EE can be triggered by a specially crafted regular expression processed through a vul
Sensitive credential and configuration disclosure in GitLab Enterprise Edition allows an authenticated user with Duo Cha
The Kubernetes integration in GitLab Enterprise Edition 11.x before 11.2.8, 11.3.x before 11.3.9, and 11.4.x before 11.4
Authenticated command injection in Dokploy (self-hostable PaaS) versions 0.29.3 through 0.29.12 lets a low-privileged us
EUVD-2026-80004
GHSA-2h44-8472-frjj
NVD
CVE.org
EPSS
Exploit-DB