Breaking Business Logic - Part: 2^7 = 1
A free account was limited to creating only one team, but the restriction was not enforced atomically. By sending many team-creation requests at the same moment, an attacker could create more teams than the plan allowed.
Published on thehemdeep.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
The target is an application that lets users create teams. An admin can create a team, add other users to it and carry out developer-related tasks. The feature that matters here is team creation, and it is gated by account tier: a premium user is allowed to add multiple teams, while a free account is allowed to add only one. If a free user tries to add a second team, the application denies the request.
The attack targets that limit: a free account ends up with more than one team. The weakness class is a race condition: the application does not validate the resource state across multiple requests that arrive at the same time.
Setup
The only precondition described is a free account on the application, which is limited to a single team. The tooling is Burp Suite with the Turbo Intruder extension. The researcher notes that Turbo Intruder is an addon for Burp Suite used to perform race-condition and brute-forcing tasks, and that it is also available in the Burp Suite Community edition.

The screenshot shows Turbo Intruder as used for this attack.
Finding it
The researcher started from the normal behaviour of the team form: fill it in, submit, and the application creates the team. For a free account, a second submission is refused because the account already owns a team. The report does not describe how the refusal is implemented; the attack relies on several submissions being processed at the same moment.

Exploitation
Step 1: Submit the add-team form
The researcher opened the add team form, filled it in and clicked submit. This produces the legitimate request that creates a team.
Step 2: Intercept and move the request to Turbo Intruder
The request was intercepted in Burp Suite and sent to Turbo Intruder, and the current request was then dropped. The researcher then dropped the current request.
Step 3: Use the race script
The script used for the race is reproduced below exactly as published:
# Find more example scripts at https://github.com/PortSwigger/turbo-intruder/blob/master/resources/examples/default.pydef queueRequests(target, wordlists): engine = RequestEngine(endpoint=target.endpoint, concurrentConnections=30, requestsPerConnection=30, pipeline=False )# the 'gate' argument blocks the final byte of each request until openGate is invoked for i in range(30): engine.queue(target.req, target.baseInput, gate='race1')# wait until every 'race1' tagged request is ready # then send the final byte of each request # (this method is non-blocking, just like queue) engine.openGate('race1')engine.complete(timeout=60)def handleResponse(req, interesting): table.add(req)
The important parts:
RequestEngineis configured withconcurrentConnections=30,requestsPerConnection=30andpipeline=False.- The loop queues 30 copies of the captured request, each tagged with the gate name
race1. The gate argument blocks the final byte of each request untilopenGateis invoked, so all 30 requests are held at the same point. engine.openGate('race1')releases the final byte of every queued request, which is what makes them land on the server together.engine.complete(timeout=60)waits for completion, andhandleResponseadds each response to the results table.
Step 4: Tune the concurrency
The researcher explains that the script creates 30 concurrent requests over 30 concurrent connections, and that this number can be increased or decreased as convenient.
Step 5: Add a payload marker in a request header
To perform this type of race condition, a payload has to be added in a request header, indicated as (%s). Turbo Intruder adds an extra header as the payload. The request with the marker looks like this:

Step 6: Launch the attack and read the output
Clicking attack produces the output below.

The result is that the application has a race condition: the resource state is not validated across multiple simultaneous requests, so the one-team limit for a free account is not enforced when the requests are processed together.
Root cause
The researcher's own conclusion is that the application does not validate the resource state on multiple requests at the same time. This is consistent with a check-then-act pattern, though the report does not describe the server's implementation. When several requests pass the check before any of them commits its write, each one proceeds. The single-team rule is not enforced across the simultaneous requests.
Impact
A free account, which is entitled to exactly one team, can end up with more than one by racing the creation request.
Fix
A fix would need to make the limit check and the team creation atomic, but the report does not discuss remediation.
Variants to test
The same pattern applies wherever a per-account or per-user limit is checked in one step and applied in another. Concrete things to try:
- Coupon or voucher redemption limited to once per account. A positive result is more than one successful redemption from a single account when the redemption requests are released together.
- Referral or signup bonus credited once per user. A positive result is multiple credits from one account.
- Withdrawal or transfer endpoints that check a balance before debiting. A positive result is a total debited amount greater than the balance.
- Invitation or seat limits on a plan. A positive result is more members or seats than the plan allows.
- Any create-once resource, such as the team in this report. A positive result is several resources owned by an account entitled to one.
For each, capture the legitimate request, drop it so nothing is committed, queue many copies behind a gate in Turbo Intruder, release them together, and compare the resulting state with the limit the application claims to enforce.
What happened, in plain words
A website let people create a "team" inside their account. Think of a team as a shared workspace: a place where several people can be gathered together and given tasks, much like a group chat where everyone can see the same messages. The site had a rule tied to the type of account you pay for. A premium (paid) account could create several teams. A free account could create only one. If a free user tried to make a second team, the site said no.
The researcher found a way around that rule. Instead of sending one request to create a team, he sent many copies of the same request at almost exactly the same moment. The site did not validate the resource state across the simultaneous requests, so the one-team limit was not enforced. The result was a free account with more than one team.
This kind of flaw is called a race condition. The everyday comparison is a queue at a ticket counter where the clerk checks your ID, then walks to the back room to fetch the ticket. If two people hand over the same ID at the same instant, the clerk checks it twice, both times sees nothing wrong, and comes back with two tickets. The check and the action were not done as one indivisible step.
A few words used throughout, explained from zero:
- Request: the message your browser sends to a website when you click a button or load a page. It is like an order slip you hand to a waiter.
- Response: the message the website sends back, such as the new page or a confirmation.
- API: the part of a website that accepts these requests and does the work behind the scenes, without drawing a page. Think of it as the kitchen: you do not see it, but it receives your order and prepares the food.
- Cookie or token: a small piece of text your browser stores and sends with every request so the site knows who you are. It is like a wristband at an event: show it and staff know you already checked in.
- Header: an extra line of information attached to a request, such as what type of content you are sending or which session you belong to. Think of the label on a parcel.
- Burp Suite: a program that sits between your browser and the website so you can look at, pause and change requests before they are sent. It is like a mailroom where you can open each envelope before it goes out.
- Turbo Intruder: an add-on for Burp Suite that can send many copies of a request at the same instant. The researcher notes it is also available in the free Community edition of Burp Suite.
- Race condition: a bug where the result depends on the exact timing of two or more actions that overlap, so a rule that holds when actions happen one after another fails when they happen together.
The target and the rule
The application lets users create teams. An admin can create a team, add other users to it and carry out developer-related tasks. The feature that matters here is team creation, and it is gated by account tier: a premium user is allowed to add multiple teams, while a free account is allowed to add only one. If a free user tries to add a second team, the application denies the request.
The attack targets that limit: a free account ends up with more than one team. The weakness class is a race condition: the application does not validate the resource state across multiple requests that arrive at the same time.

Setup
The only precondition described is a free account on the application, which is limited to a single team. The tooling is Burp Suite with the Turbo Intruder extension. The researcher notes that Turbo Intruder is an addon for Burp Suite used to perform race-condition and brute-forcing tasks, and that it is also available in the Burp Suite Community edition.

The screenshot shows Turbo Intruder as used for this attack.
Finding it
The researcher started from the normal behaviour of the team form: fill it in, submit, and the application creates the team. For a free account, a second submission is refused because the account already owns a team. The report does not describe how the refusal is implemented; the attack relies on several submissions being processed at the same moment.
Exploitation
Step 1: Submit the add-team form
The researcher opened the add team form, filled it in and clicked submit. This produces the legitimate request that creates a team.
Step 2: Intercept and move the request to Turbo Intruder
The request was intercepted in Burp Suite and sent to Turbo Intruder, and the current request was then dropped. The researcher then dropped the current request. In plain terms, you catch the order slip before the waiter reaches the kitchen, copy it many times, and tear up the original so the kitchen never receives it.
Step 3: Use the race script
The script used for the race is reproduced below exactly as published:
# Find more example scripts at https://github.com/PortSwigger/turbo-intruder/blob/master/resources/examples/default.pydef queueRequests(target, wordlists): engine = RequestEngine(endpoint=target.endpoint, concurrentConnections=30, requestsPerConnection=30, pipeline=False )# the 'gate' argument blocks the final byte of each request until openGate is invoked for i in range(30): engine.queue(target.req, target.baseInput, gate='race1')# wait until every 'race1' tagged request is ready # then send the final byte of each request # (this method is non-blocking, just like queue) engine.openGate('race1')engine.complete(timeout=60)def handleResponse(req, interesting): table.add(req)
Line by line, in plain words:
- The first line is a comment pointing to more example scripts in the Turbo Intruder project on GitHub. Comments are notes for humans; the program ignores them.
def queueRequests(target, wordlists):defines a function calledqueueRequests. Turbo Intruder calls it when you start an attack.targetis the request you captured, andwordlistsis where any word lists would be supplied.engine = RequestEngine(...)creates the engine that will send the requests. Think of it as hiring the delivery riders.endpoint=target.endpointtells the engine which address to send to, taken from your captured request.concurrentConnections=30means 30 separate connections to the server are opened at the same time. Each connection is like a separate phone line.requestsPerConnection=30allows up to 30 requests on each connection.pipeline=Falseturns off pipelining, a technique where several requests are sent down one connection without waiting for replies. Keeping it off makes the timing easier to control.- The comment explains the
gateargument: it blocks the final byte of each request untilopenGateis invoked. A request is only complete once its last byte arrives, so holding back that last byte is like loading everyone into the starting blocks and keeping the pistol raised. for i in range(30):repeats the next line 30 times.engine.queue(target.req, target.baseInput, gate='race1')puts a copy of the captured request into the queue, tagged with the gate namerace1. All 30 copies wait at that gate.- The next two comment lines explain that the script waits until every
race1tagged request is ready, then sends the final byte of each. engine.openGate('race1')releases the gate, so the final byte of all 30 requests is sent at once. This is the starting pistol.engine.complete(timeout=60)waits up to 60 seconds for the requests to finish.def handleResponse(req, interesting):defines what to do with each reply.table.add(req)adds each request and its response to the results table so you can read them afterwards.
Step 4: Tune the concurrency
The researcher explains that the script creates 30 concurrent requests over 30 concurrent connections, and that this number can be increased or decreased as convenient. The number can be increased or decreased as convenient.
Step 5: Add a payload marker in a request header
To perform this type of race condition, a payload has to be added in a request header, indicated as (%s). Turbo Intruder adds an extra header as the payload. The request with the marker looks like this:

A payload here simply means the value Turbo Intruder fills in for each copy of the request. The (%s) marker is a placeholder, like a blank on a form that gets filled in differently each time.
Step 6: Launch the attack and read the output
Clicking attack produces the output below.

The result is that the application has a race condition: the resource state is not validated across multiple simultaneous requests, so the one-team limit for a free account is not enforced when the requests are processed together.
Root cause
The researcher's own conclusion is that the application does not validate the resource state on multiple requests at the same time. This is consistent with a check-then-act pattern, though the report does not describe the server's implementation. When several requests pass the check before any of them commits its write, each one proceeds. The single-team rule is not enforced across the simultaneous requests.
"Atomically" means all or nothing, as one indivisible step. A good comparison is a turnstile that only lets one person through per coin: if the coin slot and the gate are not linked, two people pushing at once can both get through on one coin.
Impact
A free account, which is entitled to exactly one team, can end up with more than one by racing the creation request.
Fix
A fix would need to make the limit check and the team creation atomic, but the report does not discuss remediation. In everyday terms, the clerk should lock the drawer, check the ID and hand over the ticket as one uninterrupted action, so a second person cannot slip in during the gap.
Variants to test
The same pattern applies wherever a per-account or per-user limit is checked in one step and applied in another. Concrete things to try:
- Coupon or voucher redemption limited to once per account. A positive result is more than one successful redemption from a single account when the redemption requests are released together.
- Referral or signup bonus credited once per user. A positive result is multiple credits from one account.
- Withdrawal or transfer endpoints that check a balance before debiting. A positive result is a total debited amount greater than the balance.
- Invitation or seat limits on a plan. A positive result is more members or seats than the plan allows.
- Any create-once resource, such as the team in this report. A positive result is several resources owned by an account entitled to one.
For each, capture the legitimate request, drop it so nothing is committed, queue many copies behind a gate in Turbo Intruder, release them together, and compare the resulting state with the limit the application claims to enforce.
Glossary
- API: the part of a website that receives requests and performs the work behind the scenes, without drawing a page.
- Atomically: done as one indivisible step, all or nothing, so nothing can slip in between the check and the action.
- Brute-forcing: trying many variations of a request automatically until one works.
- Burp Suite: a program that sits between your browser and a website so you can inspect, pause and change requests.
- Check-then-act: a pattern where a rule is checked first and the action is performed afterwards, leaving a gap between the two.
- Concurrency: several actions happening at the same time rather than one after another.
- Cookie or token: a small piece of text your browser stores and sends with each request so the site knows who you are.
- Endpoint: the address a request is sent to.
- Gate: a Turbo Intruder feature that holds back the final byte of each request until it is released, so many requests land together.
- Header: an extra line of information attached to a request, such as the session or content type.
- Payload: the value filled into a placeholder for each copy of a request.
- Pipelining: sending several requests down one connection without waiting for each reply.
- Premium account: a paid account tier with more permissions than a free one.
- Race condition: a bug where the result depends on the exact timing of overlapping actions, so a rule that holds one at a time fails when they happen together.
- Response: the message the website sends back.
- Root cause: the underlying reason a bug exists, as opposed to its visible symptom.
- Serialising: making actions happen one after another instead of at the same time.
- Session: the site's record of your logged-in visit, usually identified by a cookie or token.
- Turbo Intruder: a Burp Suite add-on for sending many copies of a request at the same instant, used for race conditions and brute-forcing.
- Uniqueness constraint: a database rule that refuses to store a second record matching an existing one, such as a second team for the same account.