Race Condition That Created an Undeletable Group Member
A race condition in group-member management allowed two concurrent state-changing requests to leave a member in an inconsistent state. The practical effect was that the member could no longer be removed through normal application functionality.
medium.com
Published on medium.com
Bug Bounty
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.
Context
This write-up describes a Time-of-Check to Time-of-Use (TOCTOU) race condition in group and member functionality. The core idea is simple: two requests that modify the same group-member state can arrive at nearly the same time, and the application checks the state before the previous operation has fully completed, leaving the member in an inconsistent state.

The feature involved is ordinary group membership management: an administrator adds a member to a group and later removes them. The confirmed effect of the bug was that a group member could become undeletable through normal application functionality.
Setup
The write-up does not describe a specific target, accounts, roles or software versions. The only tool named is a proxy such as Burp Suite, used to capture the normal request, and the methodology calls for a tool that can send parallel HTTP requests so the timing is reliable. The write-up does not state a precondition beyond access to a group-member operation that changes state.
Finding it
The starting point is the normal workflow. Suppose an admin wants to remove Alice from a group:
Alice is a member ↓Admin clicks Remove ↓Server removes Alice ↓Alice is no longer a member
Now imagine two related requests are processed at nearly the same time. The server can temporarily see an old state in one request while another request is already changing it. That timing gap can leave the application in an unexpected state, for example the member remains present but cannot be removed through the normal workflow.
The researcher frames this as unsafe handling of shared state during concurrent requests. A simplified vulnerable design looks like this:
Request A → check member stateRequest B → check member stateRequest A → change member stateRequest B → change member state
Both requests made their decisions using state that could become outdated. The important point is that checking something and changing it must be synchronised when the operation depends on the check. This is why validating each request individually may not be enough.
Exploitation
Step 1: Test normally
First understand the intended behaviour:
Add member ↓Member appears ↓Remove member ↓Member disappears
Concurrency testing should not start before the normal workflow is understood.
Step 2: Capture the request
Use a proxy such as Burp Suite and record the following properties of the request:
HTTP methodEndpointAuthenticationSession informationObject IDsRequest bodyCSRF protection
The goal is to understand which request changes the state.
Step 3: Create concurrent requests
Duplicate the relevant request and send multiple copies at the same time, rather than one after another:
Request 1 ──┐Request 2 ──┤Request 3 ──┼──> ServerRequest 4 ──┤Request 5 ──┘
Tools that support parallel HTTP requests help make the timing more reliable.
Step 4: Check the result
After the requests finish, inspect the actual application state. Do not stop at:
HTTP 200 OK
Instead ask:
What changed?Was the object created?Was it deleted?Did the permission change?Can the action still be performed?Does the UI agree with the backend?
The final state is the important evidence.
The overall attack flow, as the researcher lays it out, is:
Identify group-member operation ↓Capture the normal HTTP request ↓Find an operation that changes member state ↓Send the same/state-related requests concurrently ↓Application processes overlapping operations ↓Database/application state becomes inconsistent ↓Member can no longer be removed normally
The attacker does not necessarily need to bypass authentication. The bug comes from making the server process valid requests at the wrong time. The payload is usually not a special malicious string: it is the same valid request sent concurrently.
Request 1 ───────┐Request 2 ───────┼──> ServerRequest 3 ───────┤Request 4 ───────┘ ↓ Shared application state ↓ Unexpected final state
Race conditions are therefore different from injection bugs: the exploitation is of timing and state, not necessarily of malformed input.
Root cause
The root cause is unsafe handling of shared state during concurrent requests. The key architectural mistake is treating a multi-step state change as if requests will always arrive one after another.
A safe design conceptually needs:
Check state+Change state+Commit state
to behave as one atomic operation. An unsafe implementation can behave like:
Request A: checkRequest B: checkRequest A: updateRequest B: update
Both requests can make decisions using state that is no longer valid.
Impact
The confirmed impact was limited compared with account takeover or remote code execution. The practical effect was an undeletable group member, creating an integrity and business-logic problem in group-management functionality.
The researcher notes that similar race conditions can be much more serious when the affected operation involves:
- Money
- Account permissions
- Invitations
- Access control
- One-time credits
- Password/MFA state
- Resource limits
The same bug class can therefore range from Low to Critical depending on what state is being raced.
Fix
It describes what developers should do: protect sensitive state transitions with atomic database transactions, row-level locking where appropriate, unique database constraints, idempotency controls, server-side state validation, correct transaction isolation and atomic check-and-update operations.
For example, instead of:
SELECT member→ check member exists→ DELETE member
the operation should be designed so the relevant state cannot change unexpectedly between the check and the update.
Variants to test
Look for operations that modify the same object, then ask what happens if two valid requests for the same object arrive at almost exactly the same time. Candidate operations:
- Add/remove group members
- Join/leave groups
- Accept/revoke invitations
- Add/remove permission
- Create/delete resources
- Redeem one-time benefits
- Vote/unvote
- Apply/remove limits
- Transfer or redeem value
Endpoints containing concepts such as the following are good hunting targets:
/member/group/invite/remove/delete/join/leave/accept/revoke
Rules such as the following are strong race-condition candidates:
Only onceMaximum 1Maximum 5Cannot be repeatedAlready existsAlready removedAlready claimed
A positive result is an inconsistent final state after the concurrent requests complete, such as an object that exists but cannot be deleted. Always verify the final state rather than relying on a 200 OK response.
What happened, in plain words
A website had a feature for managing groups: an administrator could add people to a group and later remove them. Normally that works fine. But if two requests about the same member reached the server at almost exactly the same moment, the server could get confused about what state the member was in. The result was a member who stayed in the group and could no longer be removed through the normal buttons and screens.
This kind of bug is called a race condition, and more precisely a Time-of-Check to Time-of-Use (TOCTOU) problem. Both terms are explained below. The important thing for a beginner is that no clever malicious text was needed. The attacker sent ordinary, valid requests, just at the wrong time relative to each other.
The confirmed effect was limited: an undeletable group member, which is an integrity and business-logic problem in group management. The write-up notes that the same class of bug can be far more serious when the state being raced involves money, permissions or one-time credits.

The picture illustrates the core idea: two requests that modify the same group-member state can arrive at nearly the same time, the application checks the state before the previous operation has fully completed, and the member is left in an inconsistent state.
The feature and the terms you need
Before the steps, a few words that come up constantly.
- A web application is a program you use through a browser. The browser shows pages and forms; the real work happens on a server, a computer somewhere else that stores data and answers requests.
- An API (application programming interface) is the set of addresses and rules the browser uses to talk to the server. When you click a button, the browser sends a small message to one of those addresses. Think of a restaurant: the menu and the waiter are the API, the kitchen is the server, and you never walk into the kitchen yourself.
- A request is one such message. It has a method (what kind of action, such as GET to read or POST to send data), an endpoint (the address), headers (extra information), and sometimes a body (the data being sent).
- A session is how the server remembers that the requests coming in belong to you after you log in. The browser stores a cookie or token, a short piece of text that it attaches to every request as proof of who you are. Think of a cloakroom ticket: show the ticket, get your coat; the attendant does not need to know your face.
- Authentication means proving who you are (logging in). Authorisation means what you are allowed to do once logged in.
- A proxy is a tool that sits between your browser and the server and lets you see and edit every request and response. Burp Suite is the one named in the write-up.
- State is simply the current situation stored on the server: who is in which group, which permissions exist, how many credits are left. A state-changing operation is any action that alters that situation, such as adding or removing a member.
- A race condition happens when the correctness of an operation depends on timing, and two operations overlap in a way the developer did not expect. The everyday comparison is two people editing the same shared shopping list at the same time: each reads the list, each writes their own version back, and one person's change silently disappears.
- TOCTOU, Time-of-Check to Time-of-Use, is a specific race: the program checks something (is this person a member?) and later uses that answer to act (remove them), and the situation changes in between. The everyday comparison is a bouncer checking your ticket at the door and then, while you walk to your seat, someone else takes your seat; the check was true when it happened but no longer describes reality when it is used.
- Concurrent means happening at the same time rather than one after another.
- Atomic means all-or-nothing, indivisible: an operation that either fully happens or does not happen at all, with nothing able to slip in the middle.
The feature involved is ordinary group membership management: an administrator adds a member to a group and later removes them. The confirmed effect of the bug was that a group member could become undeletable through normal application functionality.
Setup
The write-up does not describe a specific target, accounts, roles or software versions. The only tool named is a proxy such as Burp Suite, used to capture the normal request, and the methodology calls for a tool that can send parallel HTTP requests so the timing is reliable. The write-up does not state a precondition beyond access to a group-member operation that changes state.
In plain words: you need access to a group-member operation that changes state, and a way to send several copies of the request at the same instant.
Finding it
The starting point is the normal workflow. Suppose an admin wants to remove Alice from a group:
Alice is a member ↓Admin clicks Remove ↓Server removes Alice ↓Alice is no longer a member
Line by line: Alice is currently a member of the group, which is the state stored on the server. The admin clicks the Remove button in the interface. The browser sends the corresponding request and the server removes Alice from its records. From then on Alice is no longer a member, and every later request sees that new state.
This is the happy path, and it is worth understanding before trying anything unusual, because you can only recognise an abnormal result if you know what normal looks like.
Now imagine two related requests are processed at nearly the same time. The server can temporarily see an old state in one request while another request is already changing it. That timing gap can leave the application in an unexpected state, for example the member remains present but cannot be removed through the normal workflow.
The researcher frames this as unsafe handling of shared state during concurrent requests. A simplified vulnerable design looks like this:
Request A → check member stateRequest B → check member stateRequest A → change member stateRequest B → change member state
Line by line: Request A asks the server whether the member is in the expected state. Before A has finished acting on that answer, Request B asks the same question and gets the same answer, because nothing has changed yet. Then A performs its change. Then B performs its change, still acting on the answer it received earlier, which is now out of date. Both requests made their decisions using state that could become outdated.
The important point is that checking something and changing it must be synchronised when the operation depends on the check. This is why validating each request individually may not be enough: each request is perfectly valid on its own, and each check is correct at the moment it runs. The problem is the gap between the check and the change.
Exploitation
Step 1: Test normally
First understand the intended behaviour:
Add member ↓Member appears ↓Remove member ↓Member disappears
Line by line: you add a member and confirm the member shows up. You remove the member and confirm the member is gone. This gives you a baseline. Concurrency testing should not start before the normal workflow is understood, because otherwise you cannot tell whether an odd result is the bug or just how the feature normally behaves.
Step 2: Capture the request
Use a proxy such as Burp Suite and record the following properties of the request:
HTTP methodEndpointAuthenticationSession informationObject IDsRequest bodyCSRF protection
Line by line, these are the things to note down:
- The HTTP method, meaning the kind of action, such as GET or POST.
- The endpoint, the address the request goes to.
- The authentication details, how the request proves who you are.
- The session information, the cookie or token that ties the request to your logged-in session.
- The object IDs, the identifiers of the specific group and member being acted on.
- The request body, the data sent along with the request.
- The CSRF protection, an anti-forgery value the site may include to make sure the request really came from its own pages.
The goal is to understand which request changes the state. You are not attacking yet; you are learning exactly which message does the work, so that later you can send several copies of that one message.
Step 3: Create concurrent requests
Duplicate the relevant request and send multiple copies at the same time, rather than one after another:
Request 1 ──┐Request 2 ──┤Request 3 ──┼──> ServerRequest 4 ──┤Request 5 ──┘
Line by line: five copies of the same request are lined up and all leave towards the server together, instead of waiting for each answer before sending the next. The bracket on the right shows them converging on the server at roughly the same moment, which is exactly the overlap the bug needs. Tools that support parallel HTTP requests help make the timing more reliable; sending them by hand one after another is usually too slow.
Step 4: Check the result
After the requests finish, inspect the actual application state. Do not stop at:
HTTP 200 OK
Line by line: this is the server's status code meaning the request was handled without an error. It is tempting to treat it as proof of success, but it only says the server accepted and processed the message.
Instead ask:
What changed?Was the object created?Was it deleted?Did the permission change?Can the action still be performed?Does the UI agree with the backend?
Line by line: check what actually changed on the server. Check whether the object was created. Check whether it was deleted. Check whether the permission changed. Check whether the action can still be performed afterwards. Check whether what the interface (UI, the screens you see) shows agrees with what the backend (the server and its database) actually holds. The final state is the important evidence, not the status code.
The overall attack flow, as the researcher lays it out, is:
Identify group-member operation ↓Capture the normal HTTP request ↓Find an operation that changes member state ↓Send the same/state-related requests concurrently ↓Application processes overlapping operations ↓Database/application state becomes inconsistent ↓Member can no longer be removed normally
Line by line: first find the feature that manages group members. Then capture the ordinary request that feature sends. Then pick the operation that changes member state. Then send the same or related requests concurrently. The application processes operations that overlap. The database or application state becomes inconsistent. The member can no longer be removed normally.
The attacker does not necessarily need to bypass authentication. The bug comes from making the server process valid requests at the wrong time. The payload is usually not a special malicious string: it is the same valid request sent concurrently.
Request 1 ───────┐Request 2 ───────┼──> ServerRequest 3 ───────┤Request 4 ───────┘ ↓ Shared application state ↓ Unexpected final state
Line by line: four identical requests go to the server together. They all act on the same shared application state, the single record of who is in the group. Because their actions overlap, the state ends up in an unexpected final condition that the normal workflow would never produce.
Race conditions are therefore different from injection bugs: the exploitation is of timing and state, not necessarily of malformed input. An injection bug works by slipping strange text into a field; here every field contains exactly what the site expects.
Root cause
The root cause is unsafe handling of shared state during concurrent requests. The key architectural mistake is treating a multi-step state change as if requests will always arrive one after another.
A safe design conceptually needs:
Check state+Change state+Commit state
Line by line: the check, the change and the commit (making the change permanent) must be joined into one step. The plus signs stand for that joining. If nothing else can slip in between them, no second request can act on an outdated answer.
to behave as one atomic operation. An unsafe implementation can behave like:
Request A: checkRequest B: checkRequest A: updateRequest B: update
Line by line: A checks, B checks, then A updates, then B updates. Both requests can make decisions using state that is no longer valid, because B's check happened before A's update.
Impact
The confirmed impact was limited compared with account takeover or remote code execution. Account takeover means someone else gaining control of your account; remote code execution means running their own code on the server. Neither happened here. The practical effect was an undeletable group member, creating an integrity and business-logic problem in group-management functionality: the data no longer matches what the rules of the feature allow.
The researcher notes that similar race conditions can be much more serious when the affected operation involves:
- Money
- Account permissions
- Invitations
- Access control
- One-time credits
- Password/MFA state
- Resource limits
The same bug class can therefore range from Low to Critical depending on what state is being raced. Racing a group membership is annoying; racing a one-time credit or a permission check can mean real loss or real access.
Fix
It describes what developers should do: protect sensitive state transitions with atomic database transactions, row-level locking where appropriate, unique database constraints, idempotency controls, server-side state validation, correct transaction isolation and atomic check-and-update operations.
In plain words: a database transaction is a group of changes that succeed or fail together. Row-level locking means one request takes a lock on the specific record it is changing so another must wait. A unique constraint makes the database itself refuse a duplicate. Idempotency controls make repeating the same request harmless. Server-side state validation means the server re-checks the state as part of the change rather than trusting an earlier answer. Transaction isolation controls how much one in-progress transaction can see of another. Atomic check-and-update means the check and the change are one indivisible step.
For example, instead of:
SELECT member→ check member exists→ DELETE member
Line by line: this reads the member record, then checks that the member exists, then deletes the member. Three separate steps, with room in between for another request to change things.
the operation should be designed so the relevant state cannot change unexpectedly between the check and the update.
Variants to test
Look for operations that modify the same object, then ask what happens if two valid requests for the same object arrive at almost exactly the same time. Candidate operations:
- Add/remove group members
- Join/leave groups
- Accept/revoke invitations
- Add/remove permission
- Create/delete resources
- Redeem one-time benefits
- Vote/unvote
- Apply/remove limits
- Transfer or redeem value
Endpoints containing concepts such as the following are good hunting targets:
/member/group/invite/remove/delete/join/leave/accept/revoke
Line by line: these are fragments of web addresses. Each word hints at an operation that changes state: member, group, invite, remove, delete, join, leave, accept, revoke. Seeing such a word in an address is a hint that the feature behind it is worth testing for timing problems.
Rules such as the following are strong race-condition candidates:
Only onceMaximum 1Maximum 5Cannot be repeatedAlready existsAlready removedAlready claimed
Line by line: each phrase describes a limit the application is trying to enforce. A limit means the application must check something before acting, and a check before an action is exactly the gap a race condition exploits. If two requests both pass the check before either acts, the limit can be broken.
A positive result is an inconsistent final state after the concurrent requests complete, such as an object that exists but cannot be deleted. Always verify the final state rather than relying on a 200 OK response.
Glossary
- API: the set of addresses and rules a browser uses to talk to a server.
- Atomic: all-or-nothing; an operation that cannot be interrupted halfway.
- Authentication: proving who you are, usually by logging in.
- Authorisation: what you are allowed to do once you are logged in.
- Backend: the server and database side of an application, as opposed to the screens you see.
- Burp Suite: a proxy tool used to capture, inspect and replay web requests.
- Business-logic problem: a flaw where the application breaks its own intended rules rather than a technical safeguard.
- Concurrent: happening at the same time rather than one after another.
- Cookie: a small piece of text stored by the browser and sent with requests, often used to identify a session.
- CSRF protection: an anti-forgery value included in requests to prove they came from the site's own pages.
- Endpoint: the address a request is sent to.
- HTTP method: the kind of action a request asks for, such as GET or POST.
- Idempotency: the property that repeating the same request has the same effect as doing it once.
- Integrity: the property that data stays correct and consistent.
- Object ID: the identifier of a specific item, such as a particular group or member.
- Payload: the data sent in a request; in a race condition it is usually just the same valid request repeated.
- Proxy: a tool that sits between browser and server and lets you see and edit traffic.
- Race condition: a bug where the result depends on timing, because two operations overlap unexpectedly.
- Remote code execution: a flaw that lets an attacker run their own code on a server.
- Request: one message from browser to server.
- Row-level locking: locking one specific database record so another request must wait for it.
- Session: the server's memory of who you are across multiple requests.
- State: the current situation stored on the server, such as who is in which group.
- State-changing operation: any action that alters stored state.
- Status code: a number in the response saying how the request was handled, such as 200 OK.
- TOCTOU (Time-of-Check to Time-of-Use): a race where the situation changes between the moment something is checked and the moment that answer is used.
- Token: a piece of text used as proof of identity or permission, similar in role to a cookie.
- Transaction: a group of database changes that succeed or fail together.
- Transaction isolation: how much one in-progress transaction can see of another.
- UI: the user interface, the screens and controls you see in the browser.
- Unique constraint: a database rule refusing duplicate values.
- Validation: checking that data or state is acceptable before acting on it.