How I Found a $10,800 Business Impact Bug: Race Condition & Broken Access Control
The application enforced a staff account limit only in the UI, not on the server, allowing multiple concurrent requests to add staff beyond the plan limit. Additionally, the resend invite action did not re-validate the staff limit, enabling previously blocked accounts to onboard.
Published on medium.com
Before we start this article, here is a quick note. This is not a “run this command, get this bug” write-up.
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 missing server-side validation and atomic checks during staff creation, combined with asynchronous processing without proper locking, allowed concurrent requests to bypass the staff limit.
Impact
An attacker could exceed the staff limit on a free plan, potentially using paid features without paying, causing financial loss to the company.
What the attacker needed
A free account; ability to intercept requests
The fix
The developers added server-side validation during the accept invite step to check the plan's staff limit, but the race condition itself was not fully fixed.
How it was found
- Log in as a free user and go to Staff Management.
- Intercept the request to add a staff member.
- Duplicate the request multiple times with different email addresses and send them simultaneously.
- Observe that all requests return 202 Accepted and multiple staff members are added.
- When accepting invites, the first works but others show 'Invite Link Already Used'.
- Use the Resend invite action for pending members to generate fresh tokens and log in successfully.
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 limit but doesn't lock it, so sending many requests at once can bypass the limit. Here, the free plan allowed only one staff member, but by sending several requests simultaneously, the attacker added more. Also, the resend invite feature didn't check the limit again, so pending invites could be accepted later.
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.