Single-Endpoint Race Conditions — Writeup
The email change feature allowed a race condition where two parallel requests could associate an admin's email address with the attacker's account. By winning the race, the attacker inherited the pending admin invite and could access the admin panel.
medium.com
Published on medium.com
This lab focuses on a specific type of Race Condition where a single “endpoint” (a specific URL or function on a website) can be exploited if it doesn’t handle multiple requests properly.
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
Root cause
Likely the email change endpoint did not use session locking or atomic database operations, so two concurrent requests could interleave and leave the account with an unintended email address.
Impact
An attacker could take over another user's pending admin invitation and gain administrator privileges, then delete users.
What the attacker needed
A free account; Burp Suite with parallel send; victim has a pending admin invite
How it was found
- Log in as the normal user and go to the My Account section.
- Intercept the POST request that changes the email address.
- Send the request to Burp Repeater and duplicate it into two requests.
- In one request set the email to the admin's address, and in the other set it to the attacker's own address.
- Put both requests in a tab group and use Send group (parallel) to fire them simultaneously.
- Refresh the account page until the admin email appears, then confirm via the email link and access the admin panel.
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 website handles two actions at almost the same time and gets confused about which one should win. Here, changing your email and changing it to someone else's email at the same moment let the attacker take over that person's pending admin invitation.
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.