# GitLab: an MCP-scoped token could approve and merge merge requests

> CVE-2026-123142 let a GitLab MCP token approve and merge merge requests, past the checks a user's role should apply.

- **Severity:** Medium: Real and reproducible, but needs unusual setup, user help or a narrow audience. Plan a fix.
- **Category:** Vulnerability
- **Published by:** GitLab
- **Disclosed:** 2026-11-16
- **CVE:** CVE-2026-123142
- **CVSS:** 4.3
- **Affects:** GitLab Community Edition, GitLab Enterprise Edition, GitLab Duo Agent Platform
- **Research by:** Chris Bonk, Rahul Barnwal, Meir Benayoun, RJ Coleman
- **Primary source:** https://docs.gitlab.com/releases/patches/patch-release-gitlab-19-5-6-released/
- **Page:** https://theinjection.dev/items/gitlab-mcp-token-merge-request-approval/

CVE-2026-123142 let an authenticated user with an MCP-scoped OAuth token change the state of GitLab issues and merge requests, including approving and merging them. GitLab fixed it in 19.5.6, 19.4.8 and 19.3.9.

## What happened

GitLab published CVE-2026-123142 in its patch release for 19.5.6, 19.4.8 and 19.3.9 on November 16, 2026. GitLab team member Chris Bonk found that incorrect authorization checks in the GitLab MCP server let an authenticated user holding an MCP-scoped OAuth token change issue and merge request state beyond what the token allowed. The same release fixes 37 security issues, including three more authorization flaws in the Duo Agent Platform.

## How it works

Incorrect authorization is the mechanism: GitLab states the MCP server made state changes to issues and merge requests without confirming the caller was allowed to make them. The mcp scope is what an OAuth client receives through GitLab's dynamic client registration flow, and GitLab's documentation lists merge_requests and work_items among the toolsets enabled by default. Approving and merging are the review gate on a merge request, so a missing check there reaches past code review.

## Who is affected

Self-managed GitLab installations from 18.4 before 19.3.9, from 19.4 before 19.4.8, and from 19.5 before 19.5.6 carry the flaw. An attacker needs an authenticated account and a token carrying the mcp scope, which GitLab's documentation says only OAuth tokens and fine-grained personal access tokens can hold. GitLab states that GitLab.com is already patched and that GitLab Dedicated customers need no action.

## What to do

Upgrade self-managed GitLab to 19.5.6, 19.4.8 or 19.3.9, which GitLab recommends doing as soon as possible. Review which OAuth applications and fine-grained tokens hold the mcp scope, and revoke any you do not recognize. Compare merge and approval history on protected branches against the reviewers you expect.

## Quick facts

- **Affected:** GitLab CE and EE 18.4 before 19.3.9, 19.4 before 19.4.8, 19.5 before 19.5.6
- **Fixed in:** 19.5.6, 19.4.8 and 19.3.9, released November 16, 2026
- **CVE:** CVE-2026-123142, CVSS 4.3, rated medium by GitLab
- **Found by:** Chris Bonk, internal GitLab team member
- **Attack type:** Incorrect authorization in the GitLab MCP server
- **Other AI fixes:** Duo Agent Platform: CVE-2026-129253, CVE-2026-128849 and CVE-2026-115736, each CVSS 4.3
- **Status:** GitLab.com patched, GitLab Dedicated needs no action, self-managed must upgrade

## Questions

### Is my GitLab instance affected by CVE-2026-123142 if I never turned on the MCP server?

GitLab instances that never issued a token carrying the mcp scope are not exposed, because the flaw needs a caller holding that scope. GitLab lists versions from 18.4 before 19.3.9, 19.4 before 19.4.8 and 19.5 before 19.5.6 as affected, so upgrading remains the safe course even where the MCP server is unused.

### Does GitLab.com need any action for CVE-2026-123142?

GitLab.com already runs the patched version, GitLab states, and GitLab Dedicated customers need no action. Only self-managed installations have to upgrade, to 19.5.6, 19.4.8 or 19.3.9. GitLab published the fix on November 16, 2026 and recommends that self-managed administrators upgrade as soon as possible rather than waiting for the next scheduled release.

### Which AI features did GitLab patch in the same release?

GitLab's November 16 patch release fixes 37 security issues, several on its AI surface. Besides the MCP server flaw, three Duo Agent Platform authorization bugs are fixed: a developer bypassing admin-configured AI tool governance, a Duo Workflow session starting with more privileges than its flow declares, and unredacted secrets showing in secret detection findings. Each is rated CVSS 4.3.

### How do I check whether an MCP token was used to merge code in GitLab?

GitLab's advisory describes no detection method, so administrators should start from the approval and merge history on protected branches and compare it against the OAuth applications holding the mcp scope. GitLab's documentation notes that only OAuth tokens and fine-grained personal access tokens can carry that scope, which narrows the set of credentials worth reviewing.

## Sources

1. [GitLab Patch Release](https://docs.gitlab.com/releases/patches/patch-release-gitlab-19-5-6-released/)
2. [GitHub Advisory](https://github.com/advisories/GHSA-w8q8-78gq-rcrx)
3. [GitLab MCP Server Docs](https://docs.gitlab.com/user/model_context_protocol/mcp_server/)
