Skip to main content

gitlab-mcp CVE-2026-61559

| EUVDEUVD-2026-80004 CRITICAL
Server-Side Request Forgery (SSRF) (CWE-918)
2026-09-15 security-advisories@github.com GHSA-2h44-8472-frjj
9.6
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach exposed MCP HTTP transport
  2. Delivery
    Send tool call with malicious X-GitLab-API-URL header
  3. Exploit
    Server accepts unvalidated attacker host
  4. Execution
    Outbound fetch attaches victim Private-Token
  5. Persist
    Token delivered to attacker listener
  6. Impact
    Replay 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.

Act Now Prioritize within 24-48h. Why: CRITICAL severity + public POC available.
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

gitlab-mcp 0.0.1, < 2.1.27

Affected Packages

npm @zereight/mcp-gitlab fix: 2.1.27
euvd gitlab_mcp_0_0_1 fix: 2.1.27

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

Vendor (github) PRIMARY 9.6 CRITICAL
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N
vuln.today AI 9.6 CRITICAL

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.

3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None

Lifecycle Timeline

2
Patch available
Sep 15, 2026 - 22:20 EUVD
CVE Published
Sep 15, 2026 - 21:16 cve.org
CRITICAL 9.6

DescriptionCVE.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

Why It Matters

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.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 81% exploitable
Prevalence
Low
niche third-party npm MCP server for GitLab, emerging tooling, small install base
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity + public POC available
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact
Very High

Priority Score

68
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +48
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.

More in Gitlab

View all
CVE-2021-22205 CRITICAL POC
10.0 Apr 23

An issue has been discovered in GitLab CE/EE affecting all versions starting from 11.9. Rated critical severity (CVSS 10

CVE-2023-7028 CRITICAL POC
10.0 Jan 12

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.

CVE-2021-22175 CRITICAL POC
9.8 Jun 11

When requests to the internal network for webhooks are enabled, a server-side request forgery vulnerability in GitLab af

CVE-2026-85706 CRITICAL POC
10.0 Sep 12

Unauthenticated arbitrary file read in GitLab CE/EE lets remote attackers retrieve files from the GitLab server via the

CVE-2026-97229 CRITICAL POC
10.0 Oct 13

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)

CVE-2013-4490 MEDIUM POC
6.5 May 13

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

CVE-2022-2992 CRITICAL POC
9.9 Oct 17

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

CVE-2024-45409 CRITICAL POC
9.8 Sep 10

The Ruby SAML library is for implementing the client side of a SAML authorization. Rated critical severity (CVSS 9.8), t

CVE-2026-110264 CRITICAL POC
10.0 Oct 22

Remote code execution in GitLab CE/EE can be triggered by a specially crafted regular expression processed through a vul

CVE-2026-87719 CRITICAL POC
9.9 Sep 12

Sensitive credential and configuration disclosure in GitLab Enterprise Edition allows an authenticated user with Duo Cha

CVE-2018-18843 CRITICAL POC
10.0 Dec 04

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

CVE-2026-72867 CRITICAL POC
9.9 Aug 10

Authenticated command injection in Dokploy (self-hostable PaaS) versions 0.29.3 through 0.29.12 lets a low-privileged us

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy