The lab
here is how portswigger describes it
This lab makes flawed assumptions about the sequence of events in the purchasing workflow. To solve the lab, exploit this flaw to buy a "Lightweight l33t leather jacket". You can log in to your own account using the following credentials:
wiener:peter
the purchase flow assumes its steps always happen in order, add to cart, checkout, then land on the confirmation page. the confirmation step is what finalises the order, but it never re-checks that payment actually happened. so we trigger confirmation directly, out of sequence, after putting the jacket in the basket, and the order completes without our store credit being charged.
why skipping the step breaks this##
the server tracks the workflow as a series of stages but trusts that we walk them in the intended order. the confirmation endpoint is treated as "the order succeeded" and it finalises whatever is currently in the cart, yet it does not verify that the preceding checkout, the part that validates and deducts credit, ever ran for this cart. each step only assumes the one before it completed. by replaying the confirmation request on its own we reach the end state while skipping the payment state entirely. that is the flaw, state is driven by which endpoint we call rather than by a server-side check that every required step was really satisfied.
Step 1 - make a normal purchase#
we log in and buy any cheap item we can afford with our store credit, so the full order flow runs once and lands in the proxy history.

Step 2 - capture the confirmation request#
we study the proxy history and notice that placing an order sends POST /cart/checkout, which redirects us to an order confirmation page. we send the GET /cart/order-confirmation?order-confirmation=true request to Repeater.

Step 3 - add the jacket#
we add the "Lightweight l33t leather jacket" to our basket, well beyond what our store credit covers.

Step 4 - replay the confirmation out of order#
in Repeater we resend the order confirmation request directly, skipping checkout. the order completes and the jacket's cost is never deducted from our store credit.

with this, the lab is solved!
