Skip to content
IDOR Disclosed report Beginner

IDOR at /drafts/publish/

The /drafts/publish endpoint did not verify that the draft ID belonged to the requesting user, allowing an attacker to publish another user's confidential draft review. An attacker could publish drafts from private discussions they had no access to.

GitLab

Originally disclosed on GitLab

  • Fixed in 31 days
  • Disclosed after 31 days

HackerOne report #429908 by lucky_sen on 2018-10-28:

Summary: I found IDOR vulnerability at the endpoint /drafts/publish which enable me to publish unauthorised drafts.

Description: There is a feature in discussion where we can save our review as draft and then publish it later. I notice that the ID parameter are not properly check before publish any draft review so i am able to publish any one draft review even there discussion are confidential and i don't have access on it .

Steps To Reproduce:

  1. Make 2 accounts A and B and create separate merge requests in both of them.
  2. Make a draft review in both merge requests by clicking Start a review. Note down B's draft id from the response.
  3. Go through A's account and publish a comment by clicking Add comment now.
  4. Intercept the request and change the Id parameter with B's draft id. (B's draft successfully published)

Supporting Material/References:

  • Screenshot_2018-10-28_15_13_21.png
    Screenshot_2018-10-28_15_13_21.png From the original on GitLab
  • Screenshot_2018-10-28_15_13_36.png
    Screenshot_2018-10-28_15_13_36.png
  • Screenshot_2018-10-28_15_13_49.png
    Screenshot_2018-10-28_15_13_49.png

Impact

Attacker are able to publish some one confidential draft with out any authentication.

Thanks!

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

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 server did not verify that the draft ID belonged to the authenticated user before publishing it.

Impact

An attacker could publish another user's confidential draft review without authorisation.

What the attacker needed

Two accounts; ability to intercept requests

How it was found

  1. Create two accounts, A and B, and make separate merge requests in each.
  2. In both merge requests, start a draft review and note B's draft ID from the response.
  3. In account A, publish a comment by clicking 'Add comment now'.
  4. Intercept the request and replace the ID parameter with B's draft ID, which successfully publishes B's draft.

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.

An IDOR (Insecure Direct Object Reference) is when a website uses an identifier like a number to refer to something, but doesn't check if you're allowed to access it. Here, the draft ID was used without checking ownership, so anyone could publish someone else's draft by changing the ID.

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.