Race Condition Seru: Ngebobol Limit Cuma Modal Request Paralel
The backend checked a free-tier workbook quota without locking, so parallel create requests all passed the check before any workbook was counted. An attacker could create more workbooks than the three allowed, reaching six on a free account.
medium.com
Published on medium.com
Jadi, gue nemu celah race condition di sebuah platform yang ngasih user free-tier cuma bisa bikin maksimal 3 workbook.
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 quota check and the workbook creation were not atomic, so concurrent requests could all pass the limit check before any creation was recorded.
Impact
A free user could bypass the premium limit and create extra workbooks, and many users doing this at once could strain the server.
What the attacker needed
A free-tier account; ability to send parallel requests
The fix
The quota check and creation should be made atomic with database transactions or locking, plus per-user rate limiting on sensitive endpoints.
How it was found
- Log in to a free-tier account.
- Make sure the account has zero workbooks out of three.
- Intercept the workbook creation request.
- Send about ten creation requests at the same time using a concurrency tool.
- Observe that more than three workbooks were 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 happens when a program checks something and then acts on it, but another request can slip in between the check and the action. Here the server counted workbooks only when each request arrived, so many requests sent at the same moment all saw an empty or under-limit account and were allowed. The result is that a free user can get more than the allowed number of workbooks.
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.