Breaking Logic with Timing: A Race Condition Case Study (with a Vibe )
A comment API lacked rate limiting, idempotency checks and deduplication, so sending many identical GraphQL mutation requests at the same moment created duplicate comments and bypassed submission limits. An attacker could inflate comment counts or other metrics by exploiting the race window.
Published on medium.com
Put on your favorite song, plug in your headset, and let this run in the background.
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 backend validated and wrote each request independently without locking shared state or enforcing idempotency, so concurrent identical requests all passed validation and were processed.
Impact
The system could create duplicate comments and bypass submission limits, and the same pattern could affect financial transactions, account actions, or metrics like likes and votes.
What the attacker needed
Ability to send HTTP requests; a valid comment request
The fix
The system should be fixed by adding idempotency keys per request, atomic database operations, queue-based processing, and rate limiting as a safety layer, used together.
How it was found
- Capture a valid comment request in Burp Suite.
- Duplicate the request about 30 times.
- Send all duplicated requests simultaneously using Turbo Intruder.
- Observe that all requests are processed as valid, creating duplicate comments and bypassing submission limits.
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 handles several actions at the same time without checking whether they conflict. Here, the comment system assumed each request was the only one, so sending many identical requests simultaneously let all of them succeed, creating duplicates and bypassing limits.
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.