Race Conditions Are Not Only Race Conditions
The write-up describes four race-condition-style bugs found in SaaS and fintech products, where a limit or grant was checked against state that was not locked, allowing concurrent requests to exceed caps, obtain a higher fee tier without paying, register multiple pending aliases, or provision multiple eSIMs from one trial. An attacker could gain extra invites, unpaid benefits, or duplicated goods at the provider's cost.
medium.com
Published on medium.com
“Race condition” is the most successful misnomer in web security. It suggests a timing problem.
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 application made decisions against state it did not hold a lock on and committed outcomes based on that snapshot, encoding limits as procedures rather than declarative constraints.
Impact
Attackers could exceed invite caps, keep a higher fee tier without paying, create multiple pending aliases, and provision multiple eSIMs from one trial, with the cost falling on the platform or its upstream provider.
What the attacker needed
A free account; access to the batching client layer; concurrent requests
The fix
Limits and single-use rules should be moved into declarative database constraints or advisory locks, and single-use contexts should be marked consumed before fulfilment.
How it was found
- Find a mutation endpoint that enforces a numeric cap in application code rather than as a database constraint.
- Locate the batching layer the frontend already uses, such as tRPC or GraphQL operation arrays.
- Build a single request carrying many copies of the same mutation.
- Send it once and check whether more than the cap commits.
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 program checks something (like 'has this user used their one free trial?') and then acts on that answer, but something else can change the situation in between. If several requests arrive at almost the same moment, they can all see the same 'yes, allowed' answer and all succeed, even though only one should have. This write-up shows that the real mistake is not the timing but the gap between the check and the action, which can be milliseconds or even span two separate systems.
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.