Joining the Same Organization Multiple Times Using a Race Condition
The platform allowed a user to join the same organization multiple times using the same account and invite link because the join request lacked atomic validation. An attacker could send concurrent join requests to create duplicate memberships and then modify each profile separately.
Published on medium.com
In this write-up, I demonstrate how I exploited a race condition to join the same organization multiple times using the same account, bypassing logic intended to restrict users to a single membership.
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 join endpoint performed a non-atomic check-then-insert without locking, so concurrent requests all passed the uniqueness check before any membership was recorded.
Impact
The duplicate memberships break intended membership constraints and may cause billing anomalies, privilege escalation, permission conflicts, or allow fake users under the same identity.
What the attacker needed
A valid invite link; a user account; ability to send concurrent requests
The fix
The backend should use locking or atomic operations to prevent duplicate joins, validate single-use invite tokens server-side, and track join attempts to block reuse across concurrent sessions.
How it was found
- Send a normal invitation to your own user account and open the invite link.
- Intercept the join request in a proxy, drop it, and send it to a repeater group.
- Trigger the same join request in parallel (about 10 at once) using the same invite link and account.
- Observe that the same account is added to the organisation multiple times.
- Modify each duplicated membership separately (email, password, display name).
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 an attacker can squeeze in extra requests between the check and the action. Here, the platform checked that a user had not joined yet, but by sending many join requests at the same moment, the check passed for all of them before any join was saved. This let one account become several members of the same organisation.
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.