CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-5648-RGJ9-V224

GHSA-5648-RGJ9-V224: Multiple Security Control Bypasses in @zereight/mcp-gitlab

Alon Barad
Alon Barad
Software Engineer

Sep 15, 2026·6 min read·1 visit

Executive Summary (TL;DR)

Multiple critical and high severity flaws in @zereight/mcp-gitlab allow unauthenticated remote access, GraphQL authorization bypasses, and denial of service.

A constellation of five distinct security flaws (F1 through F5) in `@zereight/mcp-gitlab` prior to version 2.1.30 allows unauthenticated remote access, read-only policy bypasses, DNS rebinding, and denial-of-service via session exhaustion.

Vulnerability Overview

The @zereight/mcp-gitlab package implements a Model Context Protocol (MCP) server designed to interface large language model (LLM) agents with GitLab APIs. By presenting GitLab functionalities as semantic tools, the server allows automated agents to perform actions such as retrieving pipeline traces, writing issues, or querying data through GraphQL.

In versions prior to 2.1.30, a collection of five distinct security flaws (designated F1 through F5) compromises the authorization, confidentiality, and availability guarantees of this integration. The most severe defects allow malicious actors, or prompt-injected LLM agents, to execute unauthorized write operations and bypass the configured read-only mode boundaries.

These vulnerabilities expand the attack surface from typical local execution to remote unauthorized action orchestration, session exhaustion, and DNS rebinding. The combination of local state maintenance and weak validation in HTTP and Server-Sent Events (SSE) channels exposes the system to active exploitation under specific configurations.

Technical Deep Dive: F1 GraphQL & Scope Bypasses

The F1 vulnerability is an authorization bypass located within utils/graphql-query.ts and the "execute_graphql" tool handler in index.ts. The implementation attempts to enforce a read-only environment, controlled by the GITLAB_READ_ONLY_MODE configuration parameter, by parsing and rejecting any incoming query containing write operations.

The normalization function stripGraphQLCommentsAndStrings strips comments and strings from the GraphQL query but fails to sanitize commas. Under the GraphQL syntax specification, commas are treated as insignificant whitespace and are skipped by parsers. The server attempts to detect mutations or subscriptions using the regular expression /(?:^|[};]\s*)(mutation|subscription)\b/ on the normalized query.

By prefixing a write operation with a leading comma (for example, ,mutation { ... }), an attacker or compromised agent prevents the regex from matching because the write keyword is preceded by a comma rather than the start of the string (^), a closing brace (}), or a semicolon (;). The downstream GitLab GraphQL engine ignores the comma and executes the mutation, bypassing safety controls. Furthermore, the "execute_graphql" tool handler fails to call rejectIfProjectScopedDeployment(), allowing operations on projects outside the defined GITLAB_ALLOWED_PROJECT_IDS allow-list.

Technical Deep Dive: Network & DoS Flaws (F2, F3, and F4)

The second flaw, F2, is a deployment-conditional authentication bypass on the /mcp HTTP endpoint. When STREAMABLE_HTTP=true is set, the server only checks if MCP-layer authentication is configured when initialized with a Personal Access Token or job token. If initialized via OAuth device flow or cookie-jar pathways, the validation is skipped, exposing /mcp to unauthenticated network actors while signing requests with the server's valid credentials.

Flaw F3 involves the Server-Sent Events (SSE) transport protocol, which lacks origin and host-header verification by default and does not enforce authentication unless SSE_AUTH_TOKEN is defined. Because the server typically binds to loopback interfaces, this omission permits DNS rebinding attacks. An external site visited by the host user can issue commands to the local SSE endpoint, invoking GitLab actions on behalf of the user.

Flaw F4 represents an unauthenticated transport-exhaustion denial-of-service vulnerability. The validateToken function only performs structural checks on tokens without validating their active status upstream. An unauthenticated attacker can flood /mcp with structurally correct garbage tokens, allocating sessions up to the MAX_SESSIONS limit (1000). These dead sessions persist for one hour by default, denying access to legitimate requests.

Code-Level Patch Analysis

The remediation implemented in version 2.1.30 addresses these issues across multiple files. In utils/graphql-query.ts, the regular expression was modified to match leading commas only when they occur at the very beginning of the document string, ensuring that nested fields containing matching substrings are not falsely classified as write operations while blocking prefix evasion.

// Before patch:
// return /(?:^|[};]\s*)(mutation|subscription)\b/.test(normalized);
 
// After patch in v2.1.30:
return /(?:^(?:,\s*)?|[};]\s*)(mutation|subscription)\b/.test(normalized);

To remediate the DNS rebinding vulnerability (F3) on the SSE server, a validation middleware was introduced. This middleware checks both the Host and Origin headers against a strictly defined allow-list containing localhost and configured server URLs. If the headers do not match, the connection is closed immediately with a 403 Forbidden status.

const allowedHosts = new Set([
  `${HOST}:${PORT}`,
  `127.0.0.1:${PORT}`,
  `localhost:${PORT}`,
  `[::1]:${PORT}`,
]);
// Middleware rejects requests whose headers do not match allowedHosts

For the session exhaustion vulnerability (F4), the patch replaces local syntactical token validation with active upstream verification. The server now attempts to authenticate against the GitLab /api/v4/user endpoint before allocating an internal session object, neutralizing unauthenticated DoS attempts.

Exploit Methodology & Proof of Concepts

Exploitation of these vulnerabilities varies based on transport configuration. For the F1 GraphQL bypass, an attacker uses a prompt injection to force the LLM agent to submit a comma-prefixed GraphQL payload. Since the agent's safety middleware evaluates this as read-only, the request is permitted, and the backend processes the write command.

// Local validation bypass replication
const vulnerableRegex = /(?:^|[};]\s*)(mutation|subscription)\b/;
const bypassPayload = ",mutation { deleteProject(input: { id: 1 }) { errors } }";
const isBlocked = vulnerableRegex.test(bypassPayload);
console.log("Is Blocked:", isBlocked); // Outputs: false

In the case of F4, session exhaustion is accomplished by issuing rapid HTTP requests containing synthetic tokens to the /mcp initialization endpoint. Because the server fails to check these tokens upstream prior to session creation, it populates the active session pool to its maximum capacity, causing service denial.

# Denial of service payload execution
for i in $(seq 1 1000); do
  curl -s -o /dev/null http://127.0.0.1:3002/mcp \
    -H 'Content-Type: application/json' \
    -H 'Private-Token: dummytokenstringlongenough' \
    -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05"}}'
done

Security Impact and Risk Assessment

The collective impact of these vulnerabilities is classified as High, with an advisory CVSS v3.1 score of 8.1. The vector string is CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N. This score reflects the ability of network-adjacent or remote actors to perform high-privilege actions on the GitLab platform.

The integration of LLM agents introduces a unique attack vector through flaw F5. Because the server returns raw pipeline log traces to the LLM agent, an attacker can embed malicious instructions inside public CI job traces. When the agent processes these traces, it interprets the embedded commands as system-level instructions, potentially leveraging F1 to delete repositories or exfiltrate private code.

Furthermore, the lack of host and origin header validation on the SSE server exposes internal developer environments to cross-site request forgery and DNS rebinding attacks. This allows untrusted web origins to issue arbitrary MCP commands, effectively bridging the host's browser context with the local MCP-GitLab service instance.

Official Patches

zereightFix multiple security vulnerabilities

Fix Analysis (1)

Technical Appendix

CVSS Score
8.1/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

Affected Systems

@zereight/mcp-gitlab

Affected Versions Detail

Product
Affected Versions
Fixed Version
@zereight/mcp-gitlab
@zereight
< 2.1.302.1.30
AttributeDetail
CWE IDCWE-863
Attack VectorNetwork
CVSS8.1
ImpactAuthorization Bypass & Denial of Service
Exploit StatusProof-of-Concept
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1556Modify Authentication Process
Defense Evasion
T1190Exploit Public-Facing Application
Initial Access
T1550Use Alternate Authentication Material
Lateral Movement
T1212Exploitation for Credential Access
Credential Access
CWE-863
Incorrect Authorization

The software performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.

Known Exploits & Detection

GitHub AdvisoryIncludes local validation replication script and details

Vulnerability Timeline

Security fix implementations completed via PR #571
2026-07-04
Documentation and changelog update commit finalized
2026-07-26
Security advisory GHSA-5648-RGJ9-V224 officially reviewed, published, and version 2.1.30 released
2026-09-15

References & Sources

  • [1]GitHub Advisory
  • [2]Repository Advisory
  • [3]Resolution Pull Request #571
  • [4]Resolution Pull Request #624
  • [5]Remediation Tag / Release
  • [6]Changelog Commit Patch
  • [7]Vulnerability Source Code Repository

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 3 hours ago•CVE-2026-61568
9.6

CVE-2026-61568: DNS Rebinding Vulnerability in @zereight/mcp-gitlab Streamable HTTP Transport

A critical security vulnerability has been identified in the @zereight/mcp-gitlab implementation of the Model Context Protocol (MCP) server. Prior to version 2.1.30, the server lacks HTTP Host and Origin header validation on its Streamable HTTP transport interface (/mcp). This security omission permits remote attackers to bypass the Same-Origin Policy (SOP) via a DNS Rebinding attack. Under this vector, an attacker can route malicious API requests to the victim's local or internal MCP server, thereby gaining unauthorized control over the victim's GitLab account and resources.

Alon Barad
Alon Barad
4 views•9 min read
•about 4 hours ago•CVE-2026-61559
9.6

CVE-2026-61559: Critical Server-Side Request Forgery and Token Leakage in @zereight/mcp-gitlab

A critical Server-Side Request Forgery (SSRF) vulnerability in @zereight/mcp-gitlab allows attackers to leak sensitive GitLab Private-Tokens by supplying an arbitrary external hostname via the X-GitLab-API-URL header when dynamic routing is enabled.

Amit Schendel
Amit Schendel
5 views•7 min read
•about 5 hours ago•CVE-2026-69208
7.5

CVE-2026-69208: Memory Leak and Denial of Service in http4s DigestAuth Middleware

A critical memory leak vulnerability exists in the server-side DigestAuth middleware of the http4s library. Due to a logical inversion in the stale-nonce clean-up routine, the internal cache fails to evict stale nonces while prematurely purging fresh ones. Unauthenticated remote attackers can exploit this behavior by repeatedly prompting the server for authentication challenges, leading to unbounded memory consumption and application crashes via a java.lang.OutOfMemoryError.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 6 hours ago•CVE-2026-56830
6.5

CVE-2026-56830: Broken Function Level Authorization in Shopper Media Component

An incomplete security fix in Shopper prior to version 2.9.2 exposes a Broken Function Level Authorization (BFLA) vulnerability in the Media component. Low-privileged administrative users with 'browse_products' permissions can bypass role-based access control policies to execute the 'store' action and modify product media.

Amit Schendel
Amit Schendel
3 views•6 min read
•about 7 hours ago•CVE-2026-56825
8.1

CVE-2026-56825: Missing Authorization and State Tampering in Shopper e-commerce Admin Panel

A critical authorization bypass and insecure direct object reference (IDOR) vulnerability was discovered in Shopper, a Headless e-commerce Admin Panel. Due to missing authorization chains on table actions and the lack of a locked property on the collection state model, authenticated low-privilege staff can detach products from arbitrary collections.

Alon Barad
Alon Barad
4 views•9 min read
•about 9 hours ago•CVE-2026-59973
8.5

CVE-2026-59973: High-Severity Server-Side Request Forgery in FrontMCP and mcp-from-openapi

CVE-2026-59973 is a high-severity Server-Side Request Forgery (SSRF) vulnerability in FrontMCP and its underlying OpenAPI parsing library, mcp-from-openapi. The flaw allows authenticated attackers capable of importing or configuring OpenAPI specifications to bypass string-based hostname filtering mechanisms. By employing DNS wildcard loopbacks, HTTP redirects, or IPv4-mapped IPv6 address formatting, attackers can coerce the application into sending HTTP requests to internal networks, loopback adapters, and cloud metadata environments.

Amit Schendel
Amit Schendel
7 views•7 min read