Skip to content

AAK-MCP-GITLAB-ZEREIGHT-CVE-2026-61560-001: @zereight/mcp-gitlab below 2.1.30 (unauthenticated SSE + arbitrary file read, header-controlled API base, DNS rebinding)

Severity
CRITICAL
Category
Supply Chain (supply-chain)
Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py
Auto-fixable
No.
SARIF name
ZereightMcpGitlabUnauthAndSsrf

What it detects

@zereight/mcp-gitlab (npm), an MCP server for GitLab, carries three disclosures that share one pin at the highest fix floor. Before 2.1.27, SSE transport mode (SSE=true) exposes every MCP tool with no authentication, and the upload_markdown tool reads arbitrary files from the server's filesystem through an unsanitised file_path parameter and uploads them to a GitLab project; together an unauthenticated network-reachable caller reads /proc/self/environ, recovers GITLAB_PERSONAL_ACCESS_TOKEN and takes over the GitLab account. That is the default configuration for Docker deployments (CVE-2026-61560, CVSS 9.8, CWE-22). Also before 2.1.27, setting ENABLE_DYNAMIC_API_URL=true makes the server read the X-GitLab-API-URL request header and use it as the base URL for outbound GitLab API calls, validating only that it parses as a URL, with no allowlist or hostname restriction, while still attaching the victim's Private-Token to every such request — so any caller who reaches the transport receives the token at a host of their choosing (CVE-2026-61559, CVSS 9.6, CWE-918). Before 2.1.30, the Streamable HTTP endpoint has no effective Host or Origin allowlist, so a malicious web page uses DNS rebinding to route a browser's requests to a victim's local MCP listener while preserving an attacker-controlled Host and Origin, and the server reaches MCP initialization instead of rejecting the request at the HTTP boundary (CVE-2026-61568, CVSS 9.6, CWE-350). 2.1.30 is the highest of the three fix versions and is the floor this rule pins.

How to fix

Upgrade @zereight/mcp-gitlab to >= 2.1.30 and pin it — 2.1.27 closes the unauthenticated-SSE and dynamic-API-URL paths but not the DNS-rebinding one. Do not run the SSE transport on a reachable interface without an inbound credential, leave ENABLE_DYNAMIC_API_URL unset unless you allowlist the hostnames it may resolve to, and treat any GITLAB_PERSONAL_ACCESS_TOKEN exposed to an affected deployment as compromised: rotate it rather than relying on the upgrade alone.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-MCP-GITLAB-ZEREIGHT-CVE-2026-61560-001

Limitations

Reads @zereight/mcp-gitlab in package.json, .mcp.json, mcp.json, claude_desktop_config.json and the package-lock.json, pnpm-lock.yaml and yarn.lock lockfiles at the project root only, taking the lowest version a range allows and reporting a reference that states no version. The dependency is not read when it is declared in a sub-directory manifest (packages/app/package.json), in .cursor/mcp.json or .vscode/mcp.json, or in a lockfile format the reader does not parse (a Yarn 2+ yarn.lock). A file over 2 MB, or a lockfile over 32 MiB, is not read. A declaration nested more than 64 levels deep in package.json, a TOML manifest or an MCP config (an MCP server more than 62) is still judged, and reported without a line; a lockfile entry keeps its line at any depth.

References


All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-GITLAB-ZEREIGHT-CVE-2026-61560-001.md: the page then shows that text, with the registry reference appended under it.