Bitswift Race Condition Bug Fix Review
A race condition in the voucher claim endpoint allowed a user to send multiple parallel requests for the same voucher, potentially receiving more crypto tokens than entitled. The vulnerability was not exploited and the claim faucet was disabled while a fix was implemented.
immunefi.com
Published on immunefi.com
Whitehat Yash Sodha submitted a critical vulnerability in Bitswift to Immunefi on May 9. The race condition vulnerability would have allowed a malicious user to repeatedly claim the same voucher, which entitles a user to some amount of crypto tokens.
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 claim endpoint checked voucher validity and then processed the claim without atomicity, so parallel requests could both pass the check before either marked the voucher as used.
Impact
A malicious user could have received more crypto-assets than entitled by sending high-frequency parallel claim requests, but the vulnerability was not exploited and the faucet was disabled.
What the attacker needed
A user account with a voucher; ability to intercept and resend HTTP requests
The fix
Bitswift disabled the claim faucet and implemented methods to secure the faucet and claim functions.
How it was found
- Visit the holdings page.
- Click on claim.
- Click the claim button on any currency and intercept the request.
- Send the request multiple times using Turbo Intruder.
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 a flaw where a system does not properly handle multiple actions happening at the same time. Here, if a user clicked 'claim' many times very quickly, the system might process several claims for the same voucher before marking it as used, giving extra tokens.
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.