Blocked User Can Still Access Gitlab Instance Through Graphql Subscription via WebSocket connection
A blocked user could still use their personal access token to open a GraphQL subscription over WebSocket and receive real-time updates about issues, merge requests and CI pipelines. This bypassed the access control that normally prevents blocked users from using the API.
GitLab
Originally disclosed on GitLab
- Fixed in 8 months
- Disclosed after 8 months
⚠️ Please read the process on how to fix security issues before starting to work on the issue. Vulnerabilities must be fixed in a security mirror.
HackerOne report #3049150 by rogerace on 2025-03-20, assigned to @ottilia_westerlund:
Report | Attachments | How To Reproduce
Report
Summary
Gitlab allows an administrator to block a user, and the blocked user cannot login or access any data in the gitlab instance anymore. However, there is a bypass. A blocked user can still use his PAT and Graphql Subscription to leak information from the instance. The leaked data contains
- issues update, including title, description (through queries like
workitemUpdated), metadata (assignee, weight, label through queries likeissuableAssigneesUpdated), and new issues. - merge request status update through queries like
mergeRequestReviewersUpdated - ci pipeline status update through queries like
ciPipelineStatusUpdated
Basically every data that could be queried through gitlab graphql's subscription can be leaked, which is a lot. The reason is that this bypass is not on specific graphql queries, but on the Graphql subscription genre. So all queries allowed in graphql subscription can be executed by this blocked user, leaking all data allowed in these queries.
Note
This report is on ==Blocked== user, which is different from ==Banned== user and ==IP Restricted== user, which I also found various bypasses and reported in my other reports. ==They are not the same and not duplicate==.
# Technical Details
The reason for this vuln is quite straightforward. When a user is blocked, gitlab would prevent it form access_api, and this access_api policy is checked in graphql controller. However, graphql subscription does not use graphql controller as it uses action cable to open and remain websocket connection, totally bypass this access control against blocked user, leading to this problem.
Steps to reproduce
==The step to reproduce for this vuln is a little complicated. Please make sure following my reproduction steps exactly and refer to my video PoC if necessary.==
I will use one graphql subscription issuableAssigneesUpdated to demonstrate this vulnerability, but it works for any graphql subscription allowed by gitlab.
- In your own self-managed gitlab, using your root account, create a group and a project and add a user (attacker) to this group.
- Create an issue in the project, give it any name.
- In another browser, login the attacker account, create a Personal Access Token and save it for future uses.
- Using burpsuite to proxy all following request in the attacker browser.
- Using the attacker account, go to the issue created in step 2.
- In your burpsuite, you will find a request to
/cable, go to theWebSockets historytab, you will find many messages, find ato servermessage with content looking like
{"command":"subscribe","identifier":"{\"channel\":\"GraphqlChannel\",\"query\":\"subscription issuableAssigneesUpdated. Send this request to repeater. Note it must have ==subscription issuableAssigneesUpdated==. - Now, using the root account, go to
admin panel, find the attacker account, and block it by clicking on theellipsisicon on the right ofeditbutton. - Now in the attacker browser, if you refresh, you will find you are blocked.
- Go back to the burpsuite repeater, on the top middle, you will find a toggle button. If that button is still on, toggle it off.
- Toggle that button on, and you will find you can still connect, but if you send the
issuableAssigneesUpdatedwebsocket message again, you will find you are unauthorized by checking the message log on the right side. ==Leave the toggle on.== - Now, on the right side of toggle button, there is a pencil, click that pencil, you will find many websocket to choose, choose the connection representing your gitlab instance, and on the bottom, there is a clone button, click on that.
- You will see a panel, with HTTP request for you to edit, delete your gitlab session cookie in the Cookie header, and add
PRIVATE-TOKEN: {YOUR PAT}as a header in the request. And then click on the connect button. - You will find you successfully reconnected, and if you re-send the
issuableAssigneesUpdatedgraphql message again, you will see it is successful. The response is no longerunauthorized subscription, butnull, which is expected because it would only show data when there is update. - Go back to the owner account, update the issue title.
- Go back to burpsuite, scroll through the messages, you will see the update.
PoC
<redacted>
Impact
Confidentiality: High.
The vulnerability allows a blocked user to bypass access controls and retrieve sensitive information through GraphQL subscriptions. This includes:
- Issues: Titles, descriptions, metadata (assignees, weights, labels), and new issues.
- Merge Requests: Status updates, including approvals and changes.
- CI Pipelines status updates
Since GraphQL subscriptions can be used to monitor real-time updates, the blocked user can continuously receive updates on any changes to the data they are subscribed to, effectively leaking a wide range of sensitive information.
PR: None since this user is effectively blocked.
UI: None. This attacker does not need victim to do anything special other than continue using the gitlab instance.
Attachments
Warning: Attachments received through HackerOne, please exercise caution!
- <redacted>
How To Reproduce
Please add reproducibility information to this section:
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the access control policy for blocked users is only enforced in the GraphQL controller, while GraphQL subscriptions use Action Cable and bypass that check.
Impact
A blocked user could continuously receive real-time updates on issues, merge requests and CI pipelines, leaking sensitive information.
What the attacker needed
Attacker has a valid personal access token; attacker account is blocked by an admin; attacker can open a WebSocket connection
How it was found
- Create a group and project, add an attacker user, and create an issue.
- Log in as the attacker, create a personal access token, and proxy traffic through Burp Suite.
- Visit the issue and capture the WebSocket subscription message for issuableAssigneesUpdated.
- Block the attacker account from the admin panel.
- In Burp Repeater, clone the WebSocket connection, remove the session cookie, add the personal access token header, and reconnect.
- Resend the subscription message; it succeeds, and updates are received when the issue is changed.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When an administrator blocks a user, that user should lose all access. However, the check that enforces this only happens on normal web requests, not on the special WebSocket connection used for live updates. So the blocked user could keep listening to changes in the system.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.