Race condition on web
The blog post describes several race condition vulnerabilities in web applications, including Facebook's email confirmation flow, ad coupon redemption, Mega.nz's purchasing logic, and Keybase's invite system. Attackers could exploit these to confirm arbitrary email addresses, redeem multiple single-use coupons, or bypass invitation limits.
Published on josipfranjkovic.com
The goal of this blog post is to raise awareness about race condition attacks in both developers and security people, because I feel like not many know about this kind of bug - I have participated in CTFs whose points system was vulnerable to race conditions (even Facebook’s CTF platform was). All examples I wrote…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could confirm an email address they do not control, redeem multiple single-use coupons on one account, or bypass invitation limits, depending on the specific race condition.
What the attacker needed
A free account; ability to send concurrent requests; victim clicks a link (for some scenarios)
The fix
The vulnerabilities were fixed by the respective companies, as stated in the blog post.
How it was found
- Register a new account, but do not confirm the email or phone
- Obtain a Facebook-issued access_token for the new account
- Create multiple requests at the same time toapi.facebook.com/method/user.editregistrationcontactpoint while changing the add_contactpoint POST parameter
- you should change add_contactpoint between an email you have access to, and one you do not, for example [redacted] and [redacted]
- On [redacted] you will receive a confirmation link that will look like this: /confirmemail.php?e=[redacted]&c=13475&code=84751
- After obtaining the code, you can go to Facebook settings and confirm the email.
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 write-up has not been written yet. The Original tab links to the source.
A race condition happens when a system checks something and then acts on it, but another request can sneak in between the check and the action. This can let someone do something twice when only once should be allowed, like using a coupon multiple times or confirming an email they don't own.
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.