Skip to content
IDOR Disclosed report Beginner

Insecure direct object reference at Model Registry user is able to get all user model registry details

A normal user could view model registry details of other users by manipulating the numeric ID in a GraphQL request. The attacker could fetch all model details of other users.

GitLab

Originally disclosed on GitLab

  • Fixed in 10 days
  • Disclosed after 10 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 #2781180 by abhi-hunter on 2024-10-14, assigned to @ottilia_westerlund:

Report | Attachments | How To Reproduce

Report

Description

While i was testing your web domain i has found a vulnerability where a normal user is able to view all model registry details of all other users by just manipulating ID parameter.

Step to reproduce

1- Navigate to the URL : https://gitlab.com/hacker9672342/hacker/-/ml/models/1001018#/

image.png
image.png From the original on GitLab

2- Now click on the create new model version

image.png
image.png From the original on GitLab

3- Now,fill all the details and click on the create button but before click create and import button follow 4 step.

image.png
image.png From the original on GitLab

4- Now, open burpsuite and go the HTTP history, try to delete all the previous HTTP history.
5- Now, click on the create and import button.
6-Now, go to HTTP history and observed mentioned request.

image.png
image.png From the original on GitLab
HTTP
POST /api/graphql HTTP/2  
Host: gitlab.com  
Cookie: _gitlab_session=5900d9c69eadac67aecee144b9e738bd; _cfuvid=G1ejY9x1txQfP_X.7V7wlIM62xnYIdbIbFHa8USN8pg-1728933856640-0.0.1.1-604800000; cf_clearance=D6K6YlbMEZM3_IuiyThYLMSD5Xh2d4o9WsD74sLKw74-1728933856-1.2.1.1-dIvg2zWep0qKsv5s0D2vOJHiwTF8Xk_rE0A6ZIxI3YJ0psYE1IF5vJ98XojEmbGnlnRgQfEXbKzvtkknIPQadVJ8GnoQYQV.V62BJEY3vxwsINDHozq.5VAJt801N8Wl2H.A6UyypSM4TExq5IHDnL1bCZcN1OHfor6ypbljWkTWYHiGeG4ipXh7UKycYghgscg9ZRrKne6iZ9_ZdXmDrD2uHirBm0UysOl1sxcaTDsx7zDL8gTEhnrpBOo3ByLTRE4E1SVpOMBKL0f_iYmzO7NC_XTXR3Z7KD1_6OK7dVX8fhe7fJE3D.VWyT6lI_hrKowc05yLOPBeRwA.z7UPZu7qRfXmOvVbBhl7vmZ9oO7f0Say4MlLs2wM9dQVo_Qr9HW1UFfKDZqCxWYSZA2rDg; preferred_language=en; _sp_ses.e54d=*; _sp_id.e54d=a99dd5ac-4eab-4b31-85a7-3063e235179b.1728933862.1.1728933971..67266e9d-114f-40c6-b821-98d9c966eaa9..12c31696-60ae-48da-b990-fff2c8d5c84b.1728933861866.7; _sp_ses.6b85=*; _sp_id.6b85=defc0066-c8a5-4b70-8302-c63426c09dd1.1728933862.1.1728933972..506b7a28-eada-486e-a497-d4d05d352b70..963a4883-6ca9-45e1-96ff-93ee39f4939a.1728933861860.4; OptanonConsent=isGpcEnabled=0&datestamp=Tue+Oct+15+2024+00%3A55%3A10+GMT%2B0530+(India+Standard+Time)&version=202407.2.0&browserGpcFlag=0&isIABGlobal=false&hosts=&consentId=b6d58ffd-e720-4e49-a090-83e014243b8f&interactionCount=1&isAnonUser=1&landingPath=https%3A%2F%2Fgitlab.com%2Fusers%2Fsign_in%23%2F&groups=C0001%3A1%2CC0003%3A1%2CC0002%3A1%2CC0004%3A1; _uetsid=ebcb6d808a6111ef9efcd560448fa295; _uetvid=ebcba3a08a6111efba86111b095cd974; _ga_ENFH3X7M5Y=GS1.1.1728933863.1.0.1728933912.0.0.0; _ga=GA1.1.1893720855.1728933864; _gcl_au=1.1.65072869.1728933864; _ga_EVTFNG2S5Z=GS1.1.1728933863.1.1.1728933912.11.0.0; gitlab_user=true; gitlab_tier=false; known_sign_in=RHRXaUJkZG1JVzNYbk80RmswVFljblB4N0h0dHRFYjVrVDdBZjVLSmMxRm52aFpMQjdFV01UMmxscFFkK3lKd2pqbEZvQXBIdUdtYXdHdmI3MHBzRE9WcTIwRkhoUk9mMHFKV0tuNkN4dmdkT1Aya094U3lOcG5DamNYdVNvV0dVT3dPSk8wMDA1ZE52NEJYR1dNRzJnPT0tLWJKb3hRSUg4eE95ZjA2ZjlTeHZGNlE9PQ%3D%3D--3be92f44fc727e0c8d73b35826edd49434f7db04  
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0  
Accept: */*  
Accept-Language: en-US,en;q=0.5  
Accept-Encoding: gzip, deflate, br  
Referer: https://gitlab.com/hacker9672342/hacker/-/ml/models/1001018  
Content-Type: application/json  
X-Csrf-Token: 90AyPNY68_GoI7JTd7jbYdes8Q5rZ5ajuorFwwrm5fiBahi2v07Jm2c9QWMPTqtYhThHQthK99p0S6iAcKhvRQ  
X-Gitlab-Version: 17.5.0-pre  
X-Gitlab-Feature-Category: mlops  
Sentry-Trace: ab5470996d79445cafe52f3d743bd6cc-9b66bbf9f10ae5db-0  
Baggage: sentry-environment=gprd,sentry-release=c30a70942c6,sentry-public_key=f5573e26de8f4293b285e556c35dfd6e,sentry-trace_id=52583a3b91504750a292ecb126fea8b0,sentry-sample_rate=0.05,sentry-transaction=projects%3Aml%3Amodels%3Ashow,sentry-sampled=false  
Content-Length: 1664  
Origin: https://gitlab.com  
Sec-Fetch-Dest: empty  
Sec-Fetch-Mode: cors  
Sec-Fetch-Site: same-origin  
Priority: u=4  
Te: trailers

{"operationName":"getModel","variables":{"id":"gid://gitlab/Ml::Model/1001016"},"query":"query getModel($id: MlModelID!) {\n  mlModel(id: $id) {\n    id\n    description\n    descriptionHtml\n    name\n    versionCount\n    candidateCount\n    latestVersion {\n      id\n      version\n      packageId\n      description\n      descriptionHtml\n      candidate {\n        id\n        name\n        iid\n        eid\n        status\n        params {\n          nodes {\n            id\n            name\n            value\n            __typename\n          }\n          __typename\n        }\n        metadata {\n          nodes {\n            id\n            name\n            value\n            __typename\n          }\n          __typename\n        }\n        metrics {\n          nodes {\n            id\n            name\n            value\n            step\n            __typename\n          }\n          __typename\n        }\n        ciJob {\n          id\n          webPath\n          name\n          pipeline {\n            id\n            mergeRequest {\n              id\n              iid\n              title\n              webUrl\n              __typename\n            }\n            user {\n              id\n              avatarUrl\n              webUrl\n              username\n              name\n              __typename\n            }\n            __typename\n          }\n          __typename\n        }\n        _links {\n          showPath\n          artifactPath\n          __typename\n        }\n        __typename\n      }\n      _links {\n        showPath\n        __typename\n      }\n      __typename\n    }\n    __typename\n  }\n}\n"}

6- Where ID parameter is able to get information of other user by just manipulating numeric value .

image.png
image.png From the original on GitLab
image.png
image.png

Note: If user try to change the ID value in the UI is shows 404 error as shown below:

image.png
image.png From the original on GitLab

Impact

Here, a normal user is able to fetch all the model details of other user by just manipulating numeric value.

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

Root cause

Likely the GraphQL endpoint does not verify that the requesting user has permission to access the requested model ID.

Impact

A normal user could fetch all model details of other users by manipulating the numeric ID.

What the attacker needed

A normal user account; ability to intercept HTTP requests

How it was found

  1. Navigate to the model page URL.
  2. Click on create new model version.
  3. Fill all details and before clicking create and import, open Burp Suite and clear HTTP history.
  4. Click create and import, then observe the POST request to /api/graphql in HTTP history.
  5. Change the numeric ID in the request to another user's model ID.
  6. Observe that the response contains details of the other user's model.

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.

This is an insecure direct object reference (IDOR) bug. The application uses a numeric ID to identify a model, but does not check if the user is allowed to see that model. So by changing the ID, a user can see other people's models.

What is IDOR?

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.