During a financial audit of a modern web application, security engineers discover that concurrent asynchronous POST requests to the payment endpoint allow users to apply a single-use promotional credit code multiple times simultaneously before the database updates the credit balance to zero. Which of the following application vulnerabilities is being exploited in this scenario?
- Time-of-check to time-of-use (TOCTOU) race conditionCevap
- BCross-site scripting (XSS)
- CInsecure direct object reference (IDOR)
- DWeb application firewall (WAF) misconfiguration
Cevap
Time-of-check to time-of-use (TOCTOU) race condition
The correct answer correctly identifies the vulnerability as a race condition, specifically a time-of-check to time-of-use (TOCTOU) flaw. When multiple asynchronous requests execute simultaneously, the application checks the credit balance validity for all threads before any single thread finishes updating the balance, allowing duplicate redemptions.
Adım Adım Çözüm
Anahtar Kavram
Race Conditions and Concurrency Issues (TOCTOU)