Skip to main content
Vulnerability Database/CVE-2026-12664

CVE-2026-12664: GitLab Auth Bypass Vulnerability

CVE-2026-12664 is an authentication bypass flaw in GitLab CE/EE that allows authenticated users with read_api tokens to bypass scope restrictions. This post covers technical details, affected versions, impact, and mitigation.

Published:

CVE-2026-12664 Overview

GitLab disclosed an authorization flaw in GitLab Community Edition (CE) and Enterprise Edition (EE) that allows authenticated users to bypass token scope restrictions. The vulnerability affects all versions from 18.2 before 19.3.6, 19.4 before 19.4.3, and 19.5 before 19.5.1. An authenticated user holding a read_api-scoped token can retrieve a project's incoming email address and create work items through a GraphQL field that fails to enforce the token's declared scope. The flaw is tracked as CWE-863: Incorrect Authorization.

Critical Impact

A read-only API token can perform write operations against GitLab projects and expose private project email addresses, undermining least-privilege controls for CI/CD automation and third-party integrations.

Affected Products

  • GitLab CE/EE versions 18.2 through 19.3.5
  • GitLab CE/EE versions 19.4 through 19.4.2
  • GitLab CE/EE version 19.5.0

Discovery Timeline

  • 2026-10-22 - CVE-2026-12664 published to NVD
  • 2026-10-22 - Last updated in NVD database

Technical Details for CVE-2026-12664

Vulnerability Analysis

The vulnerability is a GraphQL authorization flaw in GitLab's API layer. GitLab tokens support granular scopes such as read_api, which should restrict callers to read-only operations. A specific GraphQL field does not validate the caller's token scope before executing its resolver.

An attacker with a valid read_api token can issue a GraphQL mutation that creates work items in projects the user can access. The same code path discloses the project's incoming email address, a value typically used to generate issues through email ingestion. Exposure of this address enables unsolicited issue creation and spam into project pipelines.

The attack requires authentication and succeeds only under specific conditions, which raises attack complexity. However, the ability to perform writes with a read-only token breaks a core trust boundary that organizations rely on for automation and integration tokens.

Root Cause

The root cause is insufficient scope enforcement on a GraphQL field resolver. GitLab's authorization layer must check both the user's permissions and the token's scope before performing privileged operations. The affected resolver evaluated user permissions but did not verify that the presenting token carried sufficient scope for the write action.

Attack Vector

Exploitation requires network access to the GitLab GraphQL endpoint and a valid read_api-scoped personal access token, project access token, or group access token. The attacker submits a crafted GraphQL request targeting the vulnerable field to create work items or extract the project's incoming email address. No user interaction is required. See the HackerOne Report #3735499 for additional context.

Detect Identity Attacks the Moment Authentication Fails

Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.

Stop Identity Attacks

Detection Methods for CVE-2026-12664

Indicators of Compromise

  • Unexpected work item creation events in audit_events attributed to users with read_api-only tokens.
  • GraphQL requests containing work item mutation fields originating from token IDs that lack the api scope.
  • Queries returning the incomingEmail or equivalent project email field from service accounts not expected to consume it.

Detection Strategies

  • Correlate GitLab audit logs with token scope metadata to identify write operations executed by read_api tokens.
  • Baseline normal GraphQL mutation volume per token and alert on deviations, particularly workItemCreate mutations.
  • Review access logs for /api/graphql requests from CI runners, bots, and integrations that should only read data.

Monitoring Recommendations

  • Forward GitLab production_json.log, api_json.log, and audit_json.log to a central SIEM for retention and query.
  • Enable GitLab audit events for personal, project, and group access tokens, including scope changes and token issuance.
  • Alert on any new work item created within minutes of a GraphQL query that enumerated project settings.

How to Mitigate CVE-2026-12664

Immediate Actions Required

  • Upgrade GitLab CE/EE to version 19.3.6, 19.4.3, or 19.5.1 depending on your deployed branch.
  • Rotate all read_api-scoped tokens that interacted with the GraphQL endpoint before patching.
  • Audit recent work item creation events and investigate any attributed to read-only token identities.

Patch Information

GitLab released fixed versions 19.3.6, 19.4.3, and 19.5.1. Review the GitLab Patch Release 19.5.1 advisory and tracking issue GitLab Work Item #603510 for the full remediation details.

Workarounds

  • Restrict network access to the GitLab GraphQL endpoint from untrusted sources using a web application firewall or reverse proxy.
  • Reduce the lifetime of read_api tokens and remove any tokens that are not actively required by automation.
  • Rotate project incoming email addresses after upgrade to invalidate any addresses that may have been harvested.
bash
# Verify installed GitLab version and plan the upgrade
sudo gitlab-rake gitlab:env:info | grep "GitLab information" -A 5

# Example upgrade on Omnibus package (Debian/Ubuntu)
sudo apt-get update && sudo apt-get install gitlab-ee=19.5.1-ee.0

# Revoke a specific personal access token via API after rotation
curl --request DELETE \
  --header "PRIVATE-TOKEN: <admin-token>" \
  "https://gitlab.example.com/api/v4/personal_access_tokens/<token_id>"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.