Join our Newsletter — 33% off our NHI Course

Notifications
Clear all

GitLab GraphQL flaws: are your self-managed controls patched yet?


(@nhi-mgmt-group)
Member Moderator
Joined: 1 year ago
Posts: 18004
Topic starter  

TL;DR: GitLab fixed two critical GraphQL flaws in self-managed instances, including an unauthenticated code injection path that could alter or delete public projects and a CSRF issue that could let mutations run over GET requests, according to OX Security Platform. The case shows how schema-level features and request handling can become direct integrity failures when validation and execution state drift apart.

NHIMG editorial — based on content published by OX Security Platform: two critical GitLab GraphQL vulnerabilities affecting self-managed instances

Questions worth separating out

Q: What breaks when GraphQL validation and execution use different documents?

A: When validation and execution are detached, the security check no longer applies to the payload that actually runs.

Q: Why do batching and multiplexing increase API security risk?

A: Batching increases risk because one request can carry multiple operations through shared parsing and execution state.

Q: How should teams reduce GraphQL exposure in self-managed applications?

A: Teams should patch quickly, restrict internet exposure, and test for middleware or tracer behaviour that rewrites documents after validation.

Practitioner guidance

  • Harden GraphQL fallback paths Inspect any compatibility, future-field, or schema fallback logic for places where attacker-controlled names can be turned into executable server methods.
  • Bind validation to the executed document Test multiplexed and batched GraphQL requests to confirm that the document validated for method, mutation, and authorization checks is the same document that executes.
  • Reassess internet exposure of /api/graphql Inventory every self-managed GitLab instance, confirm whether GraphQL is internet-facing, and place compensating controls such as a WAF or reverse proxy in front of /api/graphql while patching to the fixed releases.

What's in the full analysis

OX Security Platform's full analysis covers the operational detail this post intentionally leaves for the source:

  • The exact vulnerable GraphQL paths and the code-level fix pattern used to stop method dispatch through fallback fields
  • Branch-by-branch patch guidance for self-managed GitLab deployments and exposure checks for /api/graphql
  • The tracer state swap sequence that made the CSRF condition possible in multiplexed requests
  • Timeline details for the two CVEs and their HackerOne reporting path

👉 Read OX Security Platform's analysis of the GitLab GraphQL vulnerabilities →

GitLab GraphQL flaws: are your self-managed controls patched yet?

Explore further

View Full Forum →  |  NHI Foundation Course →



   
Quote
(@mr-nhi)
Member Moderator
Joined: 3 months ago
Posts: 17593
 

Execution-state drift is the real control failure here: the weakness is not simply that GraphQL is complex, but that validation and execution no longer describe the same request. Once a security decision is made on one document and execution happens on another, the control plane has lost integrity. That is an application security failure with direct identity impact, because authorisation decisions only matter if they apply to the executed action.

A few things that frame the scale:

  • 71% of NHIs are not rotated within recommended time frames, increasing the risk of compromise over time, according to Ultimate Guide to NHIs.
  • Only 5.7% of organisations have full visibility into their service accounts, according to Ultimate Guide to NHIs.

A question worth separating out:

Q: Who is accountable when API compatibility features become security weaknesses?

A: Accountability sits with application owners and platform security teams, because compatibility features are part of the trust boundary once they can affect execution. Frameworks such as the NIST Cybersecurity Framework 2.0 and NIST SP 800-53 both imply that control design must protect integrity all the way through execution, not just at the input layer.

👉 Read our full editorial: GitLab GraphQL flaws expose unauthenticated project and data tampering



   
ReplyQuote
Share: