Race Condition

High

Race Condition

Definition

A Race Condition is a vulnerability that occurs when an application's behavior depends on the sequence or timing of uncontrolled events. In web applications, an attacker can send multiple simultaneous requests to exploit time windows where security checks are not applied atomically.

Impact

Multiple use of discount codes or couponsDuplicated bank transfersBypassing usage limits (rate limits)Creation of duplicate resourcesPrivilege escalation through non-atomic operations

Examples

Race Condition in coupon redemption

The coupon should be usable only once, but by sending 30 requests at exactly the same time, several are processed before the first one marks the coupon as used, allowing the discount to be applied multiple times.

# Turbo Intruder script to send requests in parallel
def queueRequests(target, wordlists):
    engine = RequestEngine(endpoint=target.endpoint,
                          concurrentConnections=30,
                          requestsPerConnection=1,
                          pipeline=False)

    for i in range(30):
        engine.queue(target.req, gate='race')

    engine.openGate('race')

# Request sent 30 times simultaneously:
POST /api/coupon/redeem HTTP/1.1
{"code": "DISCOUNT50"}

Practice Race Condition with real labs

Apply what you've learned in safe environments based on real bug bounty reports.

See practice labs
2,482

hunters training

62

labs from real hacks

1,630

completions

$14,790

paid out for these bugs

11 flags captured this week·Real hacks from HackerOne · YesWeHack · Bugcrowd·No commitment·Free Academy
Free · no account

The checklist I run on every new target

47 checks ordered by cost: first what can get you in trouble, then the cheap stuff, and finally the expensive stuff — which is where the big bounties are. I'll send it to your inbox right now.

Unsubscribe in one click, from any email.

BBLabs · bug bounty training

Stop reading about bugs and start hunting them

Create your free account and practice on labs based on real hacks that paid out thousands of euros. The Academy is free forever.

No card · free Academy · cancel anytime