Skip to content
Race condition Write-up Intermediate

How A Race Condition Made These Crypto Hackers 5000 Bug Bounty

A race condition in Starport's crypto faucet allowed users to exceed the configured maximum token limit by sending many concurrent requests. An attacker could extract more free tokens than intended from any faucet built on Starport.

Roberto Follow

Published on infosecwriteups.com

A race condition occurs when two threads or processes are trying to access the same resource at the same time. Exactly what happens can depend on the the machine, the CPU, the compiler, etc., and the behavior is not always deterministic.

Roberto, on infosecwriteups.com

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 faucet checked the token limit and then updated the balance without locking, so concurrent requests all passed the check before any update.

Impact

A user could extract many more free tokens than allowed from any faucet built on Starport, potentially causing token developers to lose large amounts of tokens.

What the attacker needed

Access to a Starport-based faucet; ability to send concurrent HTTP requests

How it was found

  1. Set the faucet's maximum token limit to 11 and configure each request to send 5 tokens.
  2. Send two POST requests to transfer tokens to Alice's account, resulting in 10 tokens.
  3. Send 50 concurrent POST requests to transfer tokens to Alice's account.
  4. Observe that Alice's account balance became 30 tokens instead of the expected 10.

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 two actions occur at the same time and interfere with each other, like two people withdrawing from the same bank account simultaneously and both seeing the same balance. Here, the faucet checked the token limit before updating the balance, so many simultaneous requests all passed the check and added tokens, exceeding the limit.

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.

More by Roberto

View all

10 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.