Skip to content

Bug class · Advanced

Race conditions

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

median public bounty
$2,000

Covers CWE 362, 367, 366.

Things to try

All 73

Each line worked in a disclosed report. Test only what a program's scope allows.

Other 73

  • Send many simultaneous upvote requests for the same item from one account and check whether the counter rises more than once
  • Redeem the same coupon or gift card concurrently from several parallel requests and check whether the balance is credited more than once
  • Accept the same invitation link in parallel from one account and check whether membership is recorded more than once
  • Add team members with many simultaneous requests and check whether the plan's member limit is exceeded

Bypasses and variations

All 14
  • Send the same request from many threads so all pass the duplicate check before any record is written
  • Send parallel requests with different parameter values so each passes the limit check independently
  • Use one OTP generated for your own address against a parallel request carrying the victim's address
  • Cancel one of several parallel reset requests so the others stay active
  • Merge within the seconds before approval removal is processed after a new commit
  • Send a legacy publish request during the installation window of a paid theme

Typical fixes

All 55
  • Record votes with an atomic insert or unique constraint per user and item
  • Lock or serialise redemption so the balance update and validation happen in one transaction
  • Enforce membership uniqueness with a database constraint and an atomic insert
  • Enforce limits with atomic counters or database constraints rather than a separate check
  • Add idempotency keys and locking to payout and retest payment processing
  • Perform email change and verification in a single database transaction tied to the specific change request

Start here: a reading path

Open the path

Clear reports in order, easiest first.

Guides and techniques

View all

The best explainers, cheat sheets and technique posts on Race condition, from around the web.

Newest reports

All 1,504

Most recently disclosed.

New Race condition reports by email

Follow Race condition and get each week's new disclosures in one short email.

Free. New reports for what you follow, weekly by default. One-click unsubscribe. Privacy