For the complete documentation index, see llms.txt. This page is also available as Markdown.

Race Conditions

Race conditions occur when the timing of actions affects the outcome, allowing attackers to exploit the gap between check and use operations.

Skill Level: Intermediate to Advanced Prerequisites: HTTP understanding, concurrency concepts

Concepts

Time-of-Check to Time-of-Use (TOCTOU)

Normal flow:
1. Check: Is user balance >= $100?
2. Use: Deduct $100 from balance

Attack:
1. Send 10 parallel requests to buy $100 item
2. All checks happen before any deductions
3. All 10 purchases succeed with only $100 balance

Common Vulnerable Operations

Operation
Attack Goal

Money transfers

Double-spend, overdraft

Coupon/voucher redemption

Multiple use of single-use code

Rate limiting

Bypass request limits

File upload

Overwrite during processing

Inventory/stock

Purchase more than available

Vote/like systems

Multiple votes

Account creation

Duplicate accounts

Testing Tools

Turbo Intruder (Burp Suite)

race-the-web

Custom Python Script

curl Parallel Requests

Attack Scenarios

Coupon/Discount Code Abuse

Money Transfer Double-Spend

Rate Limit Bypass

File Upload Race

Inventory/Stock Manipulation

OAuth State Race

Detection Indicators

Advanced Techniques

Single Packet Attack

Last-Byte Synchronization

HTTP/2 Multiplexing

Tools & Resources

Last updated

Was this helpful?