Skip to content
Access control Disclosed report Intermediate

IP Restriction Bypass through Graphql Subscription via workItemUpdated

GitLab's IP restriction feature, which limits group access to specific IP addresses, can be bypassed through a GraphQL subscription operation. An authenticated attacker outside the allowed IP range can subscribe to work item updates and receive real-time data about epics and issues they should not be able to access.

GitLab

Originally disclosed on GitLab

  • Fixed in 22 days
  • Disclosed after 22 days

⚠️ 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 #3027775 by rogerace on 2025-03-10, assigned to @ngeorge1:

Report | Attachments | How To Reproduce

Report

Summary

Hope this report finds you well!

Gitlab enables group owner to restrict who can access group using IP restriction. However, this IP restriction is bypassable through graphql subscription operation, which would leak group resource to all operations allowed by subscription.

Steps to reproduce

I will leak epic information as an example. The reason I am using epic is just for ease of reproduction. You can also leak issue, but even an owner cannot view issues if restricted by IP, so it is just hard to reproduce using issue because you need to set a working IP restriction, and control a owner account within that IP range, and another account outside that IP range.

  1. Using gitlab ultimate account, create a public group and a public project.
  2. Create an epic in that group, give it any name.
  3. Using an owner account, go to group settings, and restrict IP to 1.1.1.1. Don't worry, group owners can access group settings regardless of IP restriction.
  4. Use another browser to log in any authenticated gitlab account (attacker). This account does not need to have any connection with the group. And you can see it cannot access anything in this group. It cannot see anything, and everything in this group would be 404 to this guest.
  5. Switch back to the owner account, check the epic just created. Check the http request made either in browser devtool or burpsuite, and you will find many graphql request, look through them, and you will find a mention of workItemId with the format of gid://gitlab/WorkItem/{ID}, copy it.
  6. Switch back to the attacker account, go to https://gitlab.com/-/graphql-explorer, and paste in the following query, remember to change the workItemId to yours.
GraphQL
subscription WorkItemUpdated {  
    workItemUpdated(workItemId: "YOUR_WORKITEM_ID") {  
        archived  
        closedAt  
        confidential  
        createNoteEmail  
        createdAt  
        description  
        descriptionHtml  
        duplicatedToWorkItemUrl  
        id  
        iid  
        lockVersion  
        movedToWorkItemUrl  
        name  
        promotedToEpicUrl  
        reference  
        state  
        title  
        titleHtml  
        updatedAt  
        userDiscussionsCount  
        webUrl  
    }  
}
  1. Send the request.
  2. Switch back to the owner account, edit the epics. And you will see your edit is reflected in the attacker graphql response.
What is the current bug behavior?

IP restriction is bypassed using graphql subscription

What is the expected correct behavior?

IP restriction should not be bypassed using graphql subscription

Screencast_From_2025-03-10_15-34-46.webm From the original on GitLab

Impact

PR: None, since we only need an authenticated account, which is free to register, and this account does not need to have anything to do with the victim.
Confidentiality: High, since we can leak every update.

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

How To Reproduce

Please add reproducibility information to this section:

The original report as published on GitLab. Images and videos are our own copies; raw HTML is shown as text. View it on GitLab.

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

Impact

An authenticated attacker outside the allowed IP range could leak every update to work items (such as epics) in a group that is supposed to be IP-restricted, leading to high confidentiality loss.

What the attacker needed

A free GitLab account; knowledge of a work item ID; victim group has IP restriction enabled

How it was found

  1. Create a public group and project with an ultimate account.
  2. Create an epic in that group.
  3. As an owner, restrict the group's IP to 1.1.1.1.
  4. Log in as a different authenticated user (attacker) who has no connection to the group and confirm they cannot access the group.
  5. As the owner, view the epic and capture the workItemId from a GraphQL request.
  6. As the attacker, use the GraphQL explorer to send a subscription query for that workItemId.

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.

GitLab lets group owners restrict access to only certain IP addresses. However, a feature that sends live updates (GraphQL subscriptions) did not check this IP restriction. So an attacker with any free account could subscribe to updates on a work item and see changes even though they are outside the allowed IP range.

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.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.