mcp-gitlab
CVE-2026-61462
CRITICAL
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach MCP job tool interface
-
DeliverySupply job_id='../../../user'
-
ExploitPath collapses past /jobs/ prefix
-
ExecutionRequest hits arbitrary GitLab API endpoint
-
PersistOperator PAT authorizes call
-
ImpactExfiltrate targeted GitLab resource
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V5 - File Handling File name/path control
|
| Exploitation Conditions | Exploitation requires that the mcp-gitlab server is deployed and configured with a valid GitLab personal access token, and that the attacker can control the value of the job_id (or analogous pipeline_id) parameter passed to one of the job/pipeline tools (getPipelineJob, getPipelineJobOutput/trace, artifact retrieval, play/retry/cancel, etc.). No authentication to the parameter injection point is enforced per the CVSS vector (PR:N/UI:N), and no non-default configuration is needed - the unencoded interpolation is the default code path. The practical limiting factor is reachability of the MCP tool interface: the attacker must be able to invoke the affected tools or inject the malicious identifier into an agent/pipeline that does so, and the impact is bounded by the scope of the operator's personal access token (a narrowly scoped token limits which GitLab resources can be reached). |
| Impact | The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/SC:H, score 9.2) reflects a network-reachable, low-complexity flaw with high confidentiality impact on both the vulnerable system and a subsequent system (the GitLab instance reached with the operator token). The high score is credible because exploitation requires only supplying a crafted parameter value and yields access to arbitrary GitLab API resources at the operator's privilege level. However, the PR:N rating deserves scrutiny: reaching the vulnerable code path requires the ability to invoke the MCP server's job tools (typically via the AI agent/host the server is wired into or via attacker-controlled input such as prompt injection or a malicious pipeline/job identifier), so real-world exploitation is gated by who can drive the MCP tool calls rather than being fully anonymous internet exposure. No EPSS score, KEV listing, or public POC was provided, so exploitation probability signals are absent; the disclosure quality is high (VulnCheck advisory plus upstream issue #587 and a merged code fix). Overall this is a genuine high-priority issue for anyone running this MCP server with a privileged token, tempered by the fact that it is emerging, niche software with a limited deployment footprint rather than mass-exploitable infrastructure. |
| Exploit ScenarioDerived | An attacker able to influence a job_id passed to the MCP server - for example through prompt injection into the AI agent driving it, or by supplying a malicious identifier - sends job_id='../../../user'. The server builds https://gitlab.com/api/v4/projects/1/jobs/../../../user/trace, which the URL parser collapses to /api/v4/user, and the request executes with the operator's personal access token, returning the operator's account details or any other targeted GitLab resource. No public POC beyond the fix's regression test was identified, but the technique is trivial given network reach and low attack complexity. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 13, 2026
GitLab API request redirection in zereight's mcp-gitlab (gitlab-mcp) MCP server lets attackers who control the job_id parameter escape the intended /jobs/ path prefix and reach arbitrary GitLab REST API endpoints under the operator's personal access token. Because the token is a bearer of the operator's full GitLab privileges, a crafted value such as '../../../user' resolves to /api/v4/user (or any other resource), turning a scoped job lookup into broad unauthorized data access. No public exploit was identified at time of analysis, and it is not listed in CISA KEV, but the flaw is trivially triggerable and was reported by VulnCheck with a vendor fix committed.
RemediationAI
Upstream fix available (PR/commit); released patched version not independently confirmed - apply the fix from commit e2a81a0 (https://github.com/zereight/gitlab-mcp/commit/e2a81a047ab8750fa5bfa1763b5d85e5616f3994), which routes all job and pipeline identifiers through encodeGitLabPathSegment() so traversal payloads stay within a single URL segment; upgrade to the corresponding released version once tagged and confirm against the VulnCheck advisory (https://www.vulncheck.com/advisories/mcp-gitlab-path-traversal-via-job-id-parameter). Until patched, reduce blast radius by scoping the GitLab personal access token used by the server to the minimum required scopes and a single project rather than an admin/broad token (trade-off: some tools that enumerate across projects will lose functionality), restricting which callers/agents may invoke the pipeline and job tools, and validating or rejecting job_id/pipeline_id values that contain '/', '..', or URL-encoded separators before they reach the server (trade-off: may block legitimately unusual identifiers). Monitor GitLab audit logs for the token making unexpected API calls such as /user or cross-project requests.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
mcp-gitlab is a Model Context Protocol (MCP) server that exposes GitLab CI/CD operations (pipelines, jobs, artifacts, traces) as tools an AI agent can call. It builds GitLab REST API URLs by directly interpolating caller-supplied identifiers - job_id, pipeline_id - into the path, e.g. ${apiUrl}/projects/${projectId}/jobs/${jobId}/trace. The root cause is CWE-73 (External Control of File Name or Path): jobId was not URL-encoded, so slash and ../ sequences in the value were treated as real path separators by the URL parser, collapsing the path and letting the request point at an unintended endpoint. The patch (commit e2a81a0) wraps every job/pipeline identifier in a new encodeGitLabPathSegment() helper so payloads like ../../../user are percent-encoded (..%2F..%2F..%2Fuser) and remain confined to a single path segment, as verified by an added test asserting the pathname never becomes /api/v4/user. The affected package per CPE is cpe:2.3:a:zereight:mcp-gitlab.
Know when Mcp 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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N
Network-reachable, low-complexity parameter injection with no enforced auth (PR:N per vendor); scope change (S:C) because the operator PAT reaches a different security authority, yielding high confidentiality but no integrity/availability impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
mcp-gitlab contains a path traversal vulnerability in the job_id parameter of build/index.js that allows attackers to redirect GitLab API requests to arbitrary endpoints. Attackers can supply crafted job_id values like ../../../user to escape the intended path prefix and access arbitrary GitLab API resources using the operator's personal access token.
Articles & Coverage 1
Executive ViewAI
The mcp-gitlab MCP server contains a critical path traversal vulnerability (CVE-2026-61462, CVSS 9.2) that allows attackers to bypass job lookup scoping and access arbitrary GitLab API endpoints using the server operator's credentials. Although no public exploit has been identified at time of analysis, the flaw is trivially triggerable and could enable unauthorized access to sensitive GitLab data including user information, private repositories, and CI/CD configurations. Organizations deploying this MCP server integration should treat this as an immediate security priority.
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
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB