Skip to content
Race condition Disclosed report Intermediate

Race Conditions Exist When Accepting Invitations

An invitation token could be accepted more than once because the accept action was not atomic, so two users clicking accept at nearly the same moment both got authenticated on a single invite. An attacker with an invite link could therefore join an organisation twice or let an extra person in, and the author suggests this may combine with a token timing issue to confuse an administrator.

yaworsk Follow

Originally disclosed on HackerOne

  • Triaged in 12 hours
  • Fixed in 2 days
  • Disclosed after 57 days

Hi All, Further to my last two comments on report #118312 and realizing that tokens are being stored in the DB, I realized there is probably a race condition vulnerability which allows invitation tokens to be consumed at least twice depending on the server/database response time.

I tested it tonight and was able to authenticate two accounts on one invite for my test company, test22 simply by clicking the accept button quickly in two separate browsers with two separately logged in users. I've attached screenshots of the two confirmation emails back to the administrator -- they both show the same receipt time... I know this doesn't prove the race condition so if required, I can try and duplicate it in a video if required. It only took two attempts. I was hoping you might be able to see something in the server logs - it happened at 7:58pm EST

I know this isn't necessarily a huge vulnerability in and of itself but I was thinking, a) an invitation should only be able to be accepted once and b) if I'm right with #118312 and the invitation tokens are vulnerable to a timing attack (which looks more likely given the race condition here), an attacker could accept one multiple times and the confusion for the administrator could give the attacker more time to browse reports...

Thoughts?

Attachments

invite_accepted_2.png
invite_accepted_2.png From the original on HackerOne
invite_accepted_1.png
invite_accepted_1.png

The original report as published on HackerOne, by yaworsk. 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 accept-invitation handler checks the token and then marks it consumed in separate, non-atomic steps, so concurrent requests both pass the check before either write lands.

Impact

One invitation could be redeemed by more than one account, and the author suggests this may be combined with a token timing weakness to confuse an administrator, though the race itself is described as not necessarily a huge vulnerability.

What the attacker needed

A valid invitation link; two accounts or browsers; clicking accept at nearly the same time

The fix

An invitation should only be able to be accepted once.

How it was found

  1. Create a test company and send an invitation.
  2. Log in as two separate users in two separate browsers.
  3. Use the invitation in both browsers.
  4. Click accept in both browsers as quickly as possible.
  5. Observe that both accounts are authenticated on the single invite.

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 invitation link contains a secret token meant to work once. Here a race condition let two users clicking accept at nearly the same moment both be authenticated on one invite.

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 yaworsk

View all

21 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.