PortSwigger

Lab Description
This lab’s purchasing flow contains a race condition that enables you to purchase items for an unintended price.
Objective: Successfully purchase a Lightweight “l33t” Leather Jacket.
Credentials: wiener:peter
Note: Solving this lab requires Burp Suite 2023.9 or higher.
Step 1: Log In and Study the Flow
- Log in as
wiener:peter - Add a cheap item to cart
- Apply the discount code (e.g.,
SIGNUP30) - Study the purchasing flow in Burp Proxy
Key endpoints:
POST /cart⇒ Add itemsPOST /cart/coupon⇒ Apply discount
Step 2: Understand the Restriction
Test applying discount twice:
- Apply the discount code once ⇒ Success
- Apply it again ⇒
Coupon already applied
The restriction is server-side.
Step 3: Confirm State is Session-Based
- Send
GET /cartwith session cookie ⇒ Shows your cart

- Send
GET /cartwithout session cookie ⇒ Empty cart

Cart state is stored server-side, keyed by session.
Step 4: Send Parallel Requests
- Make sure no discount is applied
- Send the
POST /cart/couponrequest to Repeater
Create multiple tabs:
- Right-click the tab ⇒ Add to group
- Duplicate the tab 19 times (20 total)
Send in parallel:
- Select Send group in parallel (separate connections)
- Click Send

Step 5: Analyze Results
Expected response:
- Multiple requests show
Coupon applied successfully - Some show
Coupon already applied
The discount was applied multiple times in the race window.
Step 6: Verify in Browser
- Refresh the cart
- The discount has been applied multiple times
- Total price is significantly reduced
Step 7: Attack the Jacket
- Clear the cart
- Add the leather jacket to cart
- Send the parallel discount requests again
- Refresh the cart
If total is below store credit:
- Click Place order
If total is still too high:
- Repeat the attack with more parallel requests

Step 8: Lab Solved
