Breaking the Limits: Exploiting a Race Condition to Bypass Free P
A free-tier user was limited to creating two endpoints, but sending many identical creation requests in parallel let all of them succeed. An attacker could bypass the paid plan restriction and create unlimited endpoints for free.
Published on keroayman77.medium.com
A race condition occurs when the outcome of a process depends on the unpredictable order in which multiple threads or processes access and modify shared resources. This can lead to unexpected and potentially erroneous results, or even security vulnerabilities.
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 endpoint-creation limit was checked and enforced without an atomic lock, so concurrent requests all passed the check before any creation was recorded.
Impact
A free user could bypass the plan limit and create many more endpoints than allowed, gaining paid functionality without paying.
What the attacker needed
A free-tier account; ability to send parallel requests
How it was found
- Start creating an endpoint and intercept the creation request.
- Send the request to Burp Repeater and drop the original.
- Duplicate the request many times and group them.
- Send all the grouped requests in parallel.
- Observe that every request succeeds and extra endpoints are created.
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 is when a program checks a rule and then acts on it, and if two requests arrive at almost the same moment, both can pass the check before either one is recorded. Here the server checked 'does this user already have two endpoints?' for each request, but all the requests were processed before any of them was saved, so the limit was never enforced. The result is that a free user gets paid features.
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.