Skip to content
Race condition Write-up Intermediate

Restricted? Not Anymore! Exploiting a Simple race condition Flaw

A free-plan user could delete their only IPFS gateway despite an error, leaving the account with zero gateways, and then send concurrent creation requests to bypass the plan's gateway limit and create unlimited gateways.

medium.com

Published on medium.com

بِسْ� اللَّه الرَّحْ� ن الرَّحِي� . . اللَّه� َّ صَلِّ وَسلَّ� وبارك على نَبِينَا � ُح� َّد

Mo2men Elmady, on medium.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

Impact

Free plan users could create an unlimited number of gateways, undermining the platform's business model and fair usage policies.

What the attacker needed

A free plan account; ability to send concurrent requests

How it was found

  1. Send a GET request to the gateways endpoint to retrieve the existing gateway ID.
  2. Send a DELETE request for that gateway ID, observing that the server returns an error but the gateway is still removed.
  3. Send multiple concurrent POST requests to the gateways endpoint to create new gateways.
  4. Observe that the free plan limit is bypassed and unlimited gateways 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, but two requests arrive so close together that both pass the check before either is recorded. Here, the service meant to stop free users from having more than one gateway, but by deleting the only one and then firing many create requests at once, the limit was never enforced.

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.

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.