Race Condition Bypass After a Fix: How I Exploited It Again
A race condition in the staff invitation acceptance endpoint allowed multiple staff members to join a store on a free plan, bypassing a subscription-based limit. The fix only added a check at the accept step, but parallel requests still bypassed it because the validation was not atomic.
medium.com
Published on medium.com
🔗Free Link: Click Here
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 add more staff members than the subscription plan allows, bypassing the intended limit and causing a business impact.
What the attacker needed
A free account; ability to send parallel requests; valid invite links
The fix
The proper fix should use locking and atomic checks to ensure the staff limit is enforced correctly even under concurrent requests.
How it was found
- Send multiple Add Staff API requests in parallel using Burp Suite.
- All staff members are created in a pending state.
- Generate fresh invite links for each user.
- Capture the Accept Invite request and duplicate it.
- Send multiple accept-invite requests at the same time.
- Observe that multiple staff members successfully join the store despite the plan limit.
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 a rule and then acts on it, but if many requests arrive at the same moment, the check can pass for all of them before any action is recorded. Here, the app checked how many staff a store had, but multiple accept-invite requests were processed at once, so the limit was bypassed. The fix only moved the check to a later step, but the same timing problem remained.
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.