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



CVE-2026-137187

CVE-2026-137187: Fail-Open Project Allowlist Authorization Bypass in @zereight/mcp-gitlab

Alon Barad
Alon Barad
Software Engineer

Dec 1, 2026·10 min read·5 visits

Executive Summary (TL;DR)

The gitlab_api_request tool in @zereight/mcp-gitlab versions >= 2.2.5 and < 2.3.7 silently skips project allowlist validation for any GitLab REST API route lacking a parseable project ID (such as /groups, /users, /search, or /admin), allowing callers to bypass configured project scope restrictions.

CVE-2026-137187 (GHSA-5xhm-p3jx-2fmc) is a missing authorization vulnerability (CWE-862) in @zereight/mcp-gitlab affecting versions 2.2.5 through 2.3.6. The flaw exists within the gitlab_api_request tool, where project allowlist enforcement fails open when evaluating API paths that do not conform to the /projects/:id pattern or when following HTTP redirects to an empty relative path. Attackers or compromised LLM agents with access to the api toolset can bypass project isolation boundaries to query or modify group, user, and instance-level GitLab resources permitted by the server's underlying authentication token.

Vulnerability Overview

@zereight/mcp-gitlab is an open-source Model Context Protocol (MCP) server built on Node.js that bridges Large Language Model (LLM) agents and client applications to GitLab instances. The server authenticates to a target GitLab host using an operator-configured Personal Access Token (PAT), Group Access Token, or Project Access Token (GITLAB_TOKEN) and exposes standardized tools for repository management, issue tracking, and CI/CD operations.

In addition to strongly typed domain tools, @zereight/mcp-gitlab provides an optional api toolset containing a raw REST escape hatch tool named gitlab_api_request (tools/gitlab-api-request.ts). This tool allows connected MCP clients to issue arbitrary HTTP requests directly against the target GitLab /api/v4 endpoint. To restrict the blast radius of this generic client, the server supports project boundary controls via static environment configuration (GITLAB_ALLOWED_PROJECT_IDS) or dynamic session scoping (ENABLE_DYNAMIC_PROJECT_SCOPE).

CVE-2026-137187 (tracked as GHSA-5xhm-p3jx-2fmc) is a Missing Authorization vulnerability (CWE-862) in the project allowlist validation logic of gitlab_api_request, introduced in commit 7d52f00d0584bd392d1725a28072f307f8403b8f (version v2.2.5). When a project allowlist is active, the authorization check in assertProjectAllowlist verifies whether the requested API route targets an approved project identifier.

Due to a fail-open implementation error, assertProjectAllowlist only enforces access controls when the path extractor (readProjectIdFromApiRelativePath) successfully parses a project ID from a /projects/:id or /projects/:id/... URI structure. If a caller requests an endpoint that does not match this structure—or if an HTTP redirect evaluates to an empty relative path—the validation function returns early without raising an exception. Consequently, any caller permitted to invoke gitlab_api_request can bypass project scoping and interact with any non-project GitLab REST API endpoint accessible to the underlying token.

Root Cause Analysis

The root cause of CVE-2026-137187 is an inverted authorization invariant (fail-open design) within two path-checking routines in tools/gitlab-api-request.ts: assertProjectAllowlist and assertRedirectedApiPathAllowed. When an operator configures an allowlist of project identifiers, the security policy requires that all requests routed through gitlab_api_request target a resource strictly subordinated to one of the designated projects.

In the vulnerable versions (>= 2.2.5, < 2.3.7), assertProjectAllowlist delegates path inspection to readProjectIdFromApiRelativePath(relativePath). This helper function splits the normalized relative API path and checks if the leading segment equals projects followed by a second segment representing the project identifier (:id). If the leading segment is not projects, or if no second segment exists, readProjectIdFromApiRelativePath returns undefined to signal that no project ID is present in the URI.

Instead of treating an undefined return value as an out-of-scope violation, assertProjectAllowlist contained the conditional statement if (projectId === undefined) { return; }. The implementation implicitly assumed that paths without a project ID did not require project allowlist validation. This logic error created three distinct bypass vectors:

  1. Non-Project Resource Endpoints: Top-level API namespaces such as groups, users, user, search, runners, admin, application/settings, and the collection root projects contain no :id segment under projects/. They return undefined from the extractor and pass validation unconditionally.
  2. Case and Encoding Discrepancies: Because readProjectIdFromApiRelativePath requires an exact lowercase literal match on the projects/ prefix after basic normalization, variations such as Projects/9, PROJECTS/5, or URL-encoded delimiters like projects%2F9 fail to match the prefix, return undefined, and bypass the allowlist check while still potentially resolving on downstream proxies or HTTP servers.
  3. Empty Redirect Targets: When handling HTTP 3xx responses, assertRedirectedApiPathAllowed checked if (relative === undefined || relative.length === 0) { return; }. While relative === undefined legitimately denotes a cross-origin redirect where credentials have already been stripped, relative.length === 0 occurs when a same-origin redirect points to the base API root (/api/v4 or /api/v4/). Returning early on an empty string allowed credentialed redirects to the API root to bypass allowlist verification.

Code Analysis

The vulnerability was remediated in version v2.3.7 via commit 9faa3beab973cae147d57f125b79e2b25d30520e. The patch modifies tools/gitlab-api-request.ts to transition both initial path validation and redirect revalidation from a fail-open model to a strict fail-closed model whenever a project allowlist is populated (allowlist.length > 0).

@@ -168,9 +168,13 @@ function assertRedirectedApiPathAllowed(
   if (allowlist.length === 0) {
     return;
   }
-  if (relative === undefined || relative.length === 0) {
+  // Only an untrusted cross-origin hop is left here, and it carries no credentials.
+  if (relative === undefined) {
     return;
   }
+  if (relative.length === 0) {
+    throw notProjectScopedError(allowlist);
+  }
   let normalized: string;
   try {
     normalized = normalizeGitLabApiRelativePath(relative);
@@ -181,6 +185,18 @@ function assertRedirectedApiPathAllowed(
   assertProjectAllowlist(normalized, allowlist);
 }
 
+function notProjectScopedError(allowlist: readonly string[]): GitLabApiRequestInputError {
+  return new GitLabApiRequestInputError(
+    `Access denied: gitlab_api_request path is not scoped to a project in the allowed project list: ${allowlist.join(", ")}. ` +
+      "Only /projects/:id and /projects/:id/... paths are allowed while a project allowlist is in effect"
+  );
+}
+
+/**
+ * With an allowlist, the path must be `projects/:id` or `projects/:id/...` for an
+ * allowed project. Any other path (groups, users, search, admin, the projects
+ * collection, or a route this parser does not recognize) is refused.
+ */
 function assertProjectAllowlist(relativePath: string, allowlist: readonly string[]): void {
   if (allowlist.length === 0) {
     return;
@@ -193,7 +209,7 @@ function assertProjectAllowlist(relativePath: string, allowlist: readonly string
     throw new GitLabApiRequestInputError(message);
   }
   if (projectId === undefined) {
-    return;
+    throw notProjectScopedError(allowlist);
   }
   const rawSegment = relativePath.split("/")[1] ?? projectId;
   if (!projectAllowed(projectId, rawSegment, allowlist)) {

The patch introduces the helper function notProjectScopedError(allowlist), which constructs a GitLabApiRequestInputError explicitly stating that only /projects/:id and /projects/:id/... paths are permitted when a project allowlist is active. In assertProjectAllowlist, the early return on projectId === undefined is replaced with throw notProjectScopedError(allowlist). Similarly, in assertRedirectedApiPathAllowed, the check for relative === undefined and relative.length === 0 is decoupled so that an empty relative path (relative.length === 0) immediately throws notProjectScopedError(allowlist).

> [!NOTE] > Assessment of Fix Completeness: The patch in 9faa3beab973cae147d57f125b79e2b25d30520e completely resolves the URI path validation bypass for non-project routes and empty relative redirects. However, as noted by the vendor in the commit documentation, gitlab_api_request only inspects the request URL path. It does not inspect query parameters or JSON request bodies that reference secondary project identifiers (such as target_project_id in merge request creation or from_project_id in fork endpoints). If the underlying GitLab token possesses permissions on external projects, operations initiated under /projects/<allowed_id>/... that accept cross-project parameters in the payload remain dependent on GitLab's server-side token authorization.

Exploitation

Exploitation of CVE-2026-137187 requires three configuration preconditions on the target @zereight/mcp-gitlab deployment. First, the operator must explicitly enable the api toolset via the GITLAB_TOOLSETS environment variable (e.g., GITLAB_TOOLSETS=api or GITLAB_TOOLSETS=core,api), as the raw api toolset is not enabled in the default toolset profile. Second, a project restriction boundary must be active via GITLAB_ALLOWED_PROJECT_IDS or dynamic session headers (ENABLE_DYNAMIC_PROJECT_SCOPE). Third, the configured GITLAB_TOKEN must hold permissions across the GitLab instance or parent groups that exceed the narrow scope of the allowed project IDs.

In a typical deployment, an attacker exploits this flaw either by directly invoking MCP tool calls over an authenticated transport session or through an indirect prompt injection payload embedded inside a GitLab issue, merge request description, or code comment processed by an LLM agent. When the agent processes the untrusted content within an allowed project (e.g., Project ID 5), the payload instructs the agent to invoke gitlab_api_request against unscoped API routes.

{
  "method": "tools/call",
  "params": {
    "name": "gitlab_api_request",
    "arguments": {
      "method": "GET",
      "path": "groups/12/variables"
    }
  }
}

When the server evaluates the payload above, normalizeGitLabApiRelativePath normalizes the path to groups/12/variables. Subsequently, readProjectIdFromApiRelativePath("groups/12/variables") inspects the leading path segment (groups), determines it does not match projects, and returns undefined. The vulnerable assertProjectAllowlist function hits if (projectId === undefined) return; and dispatches the HTTP GET request to https://<gitlab-host>/api/v4/groups/12/variables with the server's PRIVATE-TOKEN or Authorization header attached, returning group-level CI/CD secrets to the caller.

Attackers can leverage the same mechanism to execute global code and credential searches across the entire GitLab instance or modify non-project resources (unless GITLAB_PERMISSION_MODE=readonly is set):

{
  "method": "tools/call",
  "params": {
    "name": "gitlab_api_request",
    "arguments": {
      "method": "GET",
      "path": "search",
      "query": {
        "scope": "blobs",
        "search": "BEGIN OPENSSH PRIVATE KEY"
      }
    }
  }
}

Additional high-value endpoints accessible via this bypass include /projects (enumerating all repositories visible to the token), /users and /user (enumerating accounts and token owner metadata), /runners/all (listing registered CI runners), and /admin/ci/variables (extracting instance-wide secrets if the configured token belongs to an administrator).

Impact Assessment

CVE-2026-137187 is rated Medium severity with a CVSS v3.1 base score of 5.4 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N). The Attack Vector is Network (AV:N) and Attack Complexity is Low (AC:L), as exploitation consists of sending standard MCP JSON-RPC tools/call messages with standard GitLab REST paths. Privileges Required is Low (PR:L) and User Interaction is None (UI:N), reflecting that the attacker must already possess access to invoke tools on the MCP server or control the context of a connected LLM agent.

The Confidentiality (C:L) and Integrity (I:L) ratings reflect unauthorized read and write access to GitLab resources outside the configured project allowlist, bounded by the permissions of the underlying GITLAB_TOKEN. There is no direct Availability impact (A:N) to the MCP server daemon itself, though write-capable tokens could be abused to alter or delete non-project objects on the GitLab host if destructive HTTP methods are permitted.

In multi-tenant or shared agent environments where ENABLE_DYNAMIC_PROJECT_SCOPE or GITLAB_ALLOWED_PROJECT_IDS is used as the primary tenancy isolation control, the practical security impact depends entirely on the privileges of the backing GitLab token. If an operator configures a high-privilege Personal Access Token (e.g., api scope on a group owner or instance administrator account) and relies on GITLAB_ALLOWED_PROJECT_IDS to confine the LLM agent to a single sandbox repository, this vulnerability allows complete escape from the project boundary to read sensitive source code via /search, harvest CI/CD secrets via /groups/:id/variables, and modify group or user settings.

As of this writing, CVE-2026-137187 is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, has no assigned EPSS score, and has no reports of active exploitation in the wild. Proof-of-concept test cases demonstrating the bypass against /users, /groups/1/projects, /projects, /search, /runners/all, and /admin/ci/variables are publicly documented in the upstream regression test suite (test/gitlab-api-request-tool.test.ts).

Remediation

Operators running @zereight/mcp-gitlab versions 2.2.5 through 2.3.6 should upgrade immediately to version 2.3.7 or later. Version 2.3.7 enforces fail-closed validation in assertProjectAllowlist and assertRedirectedApiPathAllowed, refusing any request or redirect in gitlab_api_request that does not resolve to an explicitly permitted /projects/:id or /projects/:id/... endpoint.

# Upgrade global or local installation via npm
npm install @zereight/mcp-gitlab@2.3.7
 
# Or pin the MCP client configuration to run v2.3.7+ via npx
npx @zereight/mcp-gitlab@2.3.7

If immediate upgrading is not possible, operators can completely eliminate the attack vector by removing the api toolset from the GITLAB_TOOLSETS environment variable. Because the vulnerability exists exclusively within the gitlab_api_request tool provided by the api toolset, running with the default toolsets (or omitting api from custom toolset lists) disables the vulnerable code path.

As a defense-in-depth measure—even after upgrading to v2.3.7—administrators should enforce least privilege on the underlying GitLab credential configured in GITLAB_TOKEN. Rather than using an instance-wide or group-wide Personal Access Token and relying solely on MCP-layer project allowlists, configure a dedicated GitLab Project Access Token scoped exclusively to the target project with the minimum required role and scopes (such as read_api). Additionally, setting GITLAB_PERMISSION_MODE=readonly restricts gitlab_api_request to HTTP GET requests, preventing unauthorized state modifications across the GitLab API.

Official Patches

zereight (GitHub Security Advisory)Official GitHub Security Advisory for GHSA-5xhm-p3jx-2fmc / CVE-2026-137187
zereight (GitHub Commit)Patch commit enforcing fail-closed project allowlist validation in gitlab_api_request
zereight (GitHub Release)Release v2.3.7 containing the fix for CVE-2026-137187

Fix Analysis (1)

Technical Appendix

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

Affected Systems

@zereight/mcp-gitlab (npm package / Model Context Protocol server for GitLab)

Affected Versions Detail

Product
Affected Versions
Fixed Version
@zereight/mcp-gitlab
zereight
>= 2.2.5, < 2.3.72.3.7
AttributeDetail
CVE / GHSA IDCVE-2026-137187 / GHSA-5xhm-p3jx-2fmc
Vulnerability ClassCWE-862: Missing Authorization (Fail-Open Allowlist)
CVSS v3.1 Score5.4 Medium (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N)
Affected Component@zereight/mcp-gitlab tools/gitlab-api-request.ts (gitlab_api_request)
Vulnerable Versions>= 2.2.5, < 2.3.7 (Fixed in 2.3.7)
Attack VectorNetwork via MCP tool invocation using non-project API paths (e.g., /groups, /search, /users)
Exploit & KEV StatusPoC in unit tests; Not listed in CISA KEV

MITRE ATT&CK Mapping

T1068Exploitation for Privilege Escalation
Privilege Escalation
CWE-862
Missing Authorization

The software does not perform an authorization check when an actor attempts to access a resource or perform an action.

Vulnerability Timeline

Fix commit 9faa3beab973cae147d57f125b79e2b25d30520e authored and v2.3.7 released
2026-10-23
GitHub Security Advisory GHSA-5xhm-p3jx-2fmc and CVE-2026-137187 published
2026-11-30
NVD published official CVE record and CVSS v3.1 scoring
2026-11-30

References & Sources

  • [1]GitHub Security Advisory GHSA-5xhm-p3jx-2fmc
  • [2]Fix Commit 9faa3beab973cae147d57f125b79e2b25d30520e
  • [3]@zereight/mcp-gitlab Release v2.3.7
  • [4]NVD Vulnerability Detail: CVE-2026-137187
  • [5]CVE.org Record: CVE-2026-137187
  • [6]CVEListV5 Record for CVE-2026-137187

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

•7 minutes ago•GHSA-CX3C-RMCX-FF35
5.9

GHSA-cx3c-rmcx-ff35: Metadata Partition-Key Collisions in OpenTelemetry Collector exporterhelper

An improper data encoding vulnerability (CWE-172) exists in the OpenTelemetry Collector exporterhelper package between versions 0.147.0 and 0.163.x. When metadata-partitioned batching is enabled with multiple metadata keys, the partition key generator uses an unescaped null byte delimiter to concatenate key names and multi-valued header arrays. An authenticated attacker capable of sending multi-valued HTTP or gRPC headers to an ingress receiver can induce partition key collisions, causing cross-tenant telemetry data mixture, data poisoning, or unauthorized data exfiltration.

Alon Barad
Alon Barad
3 views•10 min read
•about 3 hours ago•GHSA-R73Q-GWX2-FPXM
6.8

GHSA-r73q-gwx2-fpxm: Arbitrary Host Directory Mount and Sandbox Bypass via Theme Module Replacements in Hugo

Hugo versions 0.152.0 through 0.167.x contain a path traversal and sandbox bypass vulnerability in the module configuration loader. When a root project does not define module replacements, Hugo permits imported themes or modules to define their own module.replacements directives. Because replaced module imports are internally marked as project-replaced, they bypass theme directory path restrictions, allowing an untrusted theme to mount arbitrary host filesystem directories and expand the Node.js read sandbox.

Amit Schendel
Amit Schendel
7 views•10 min read
•about 4 hours ago•CVE-2026-135388
9.1

CVE-2026-135388: Cryptographic Signature Verification Bypass in Pion DTLS

CVE-2026-135388 (GHSA-7c2r-jhm9-43vf) is an improper verification of cryptographic signature vulnerability (CWE-347) in Pion DTLS, a pure Go implementation of Datagram Transport Layer Security (RFC 6347). The vulnerability stems from signature scheme confusion and missing cryptographic parameter binding in the handshake verification functions verifyKeySignature and verifyCertificateVerify. By presenting a genuine peer certificate paired with an incompatible or digest-less signature hash algorithm on the wire, an unauthenticated network adversary can bypass signature verification without possessing the peer's private key. This allows peer impersonation and full compromise of confidentiality and integrity in DTLS-protected channels, including WebRTC sessions utilizing SDP certificate fingerprint verification.

Alon Barad
Alon Barad
8 views•10 min read
•about 5 hours ago•CVE-2026-134024
6.8

CVE-2026-134024: Latent Server-Side Request Forgery Gadget in TastyIgniter Media Attachment Handler

CVE-2026-134024 is a Server-Side Request Forgery (SSRF) vulnerability (CWE-918) in the TastyIgniter open-source restaurant management platform prior to version 4.4.4. The flaw resides in the Media::addFromUrl() helper method within the tastyigniter/core package, which initiates outbound HTTP GET requests to caller-supplied URLs and persists the response body without validating the URI scheme, target hostname, or resolved IP address. Although unreachable in a default unextended installation, the method functions as a latent SSRF gadget that exposes the host environment to internal network reconnaissance and cloud metadata extraction when invoked by third-party extensions or custom application code.

Alon Barad
Alon Barad
7 views•10 min read
•about 6 hours ago•CVE-2026-61832
7.5

CVE-2026-61832: Improper Certificate Validation and Insecure Deserialization in NukeViet CMS

CVE-2026-61832 is a compound vulnerability in NukeViet CMS versions prior to 4.6.00 resulting from disabled TLS certificate validation (CWE-295) in internal HTTP clients and unrestricted PHP deserialization (CWE-502) in administrative extension store handlers. An adversary-in-the-middle (AiTM) attacker can intercept outbound HTTPS connections to the NukeViet extension store API and inject a crafted serialized PHP object. When an administrator interacts with the extension store, the application deserializes the response, triggering an in-tree Property-Oriented Programming (POP) gadget chain in Guzzle to achieve arbitrary file write and remote code execution.

Amit Schendel
Amit Schendel
8 views•10 min read
•about 7 hours ago•CVE-2026-69217
8.7

CVE-2026-69217: HTTP Request and Response Smuggling in http4s ember-core

CVE-2026-69217 (also tracked as GHSA-p83c-4wj9-p6w9) is an HTTP request and response smuggling vulnerability in the ember-core module of the http4s Scala library. Prior to versions 0.23.35 and 1.0.0-M47, the HTTP/1.1 message parser failed to reject HTTP messages containing duplicate Content-Length header fields with conflicting values or sign-prefixed numeric values. Instead of returning a 400 Bad Request error as mandated by RFC 9112 Section 6.3, the parser accepted all occurrences sequentially and honored the final Content-Length value, while also permitting negative numbers via Scala's standard string-to-long conversion. When deployed behind a reverse proxy or intermediary that prioritizes the first Content-Length header or handles non-digit characters differently, unauthenticated remote attackers can desynchronize persistent HTTP/1.1 connections to perform web cache poisoning, bypass front-end security controls, and capture cross-user HTTP requests.

Amit Schendel
Amit Schendel
8 views•11 min read