Security lab
Race Condition
A coupon code can be applied multiple times by sending concurrent requests before the use_count increments.
Lab objective
Apply the same coupon code 5+ times in a single order by exploiting the race condition. The flag unlocks when your discount exceeds 100%.
Tools you will use
- browser
- Burp Suite
- curl
What this lab teaches
This lab is a self-contained exercise hosted in an isolated, per-user sandbox. You are given a clear objective, the tools typically used for the technique, and a guided set of hints. Because every sandbox is disposable and network-isolated, you can experiment freely, make mistakes, and reset the environment without affecting any real system.
Hints & approach
- 01The /shop/apply-coupon endpoint reads use_count, checks it, then increments — a classic TOCTOU.
- 02Send 10+ concurrent POST requests with the same coupon code using Burp Intruder or curl --parallel.
- 03The flag endpoint unlocks when total_discount >= original_price.
How the sandbox works
When you start the lab, Vulnarex provisions an isolated, per-user environment and opens it in a new tab. Each session has its own target and state, so nothing you do here can affect another learner or any external system. You can reset the environment at any time and re-approach the challenge from a clean slate.