Locate possible injection points
As usual the first step is to analyse the application, let's open the debugger in the stock checker page and locate scripts
and we have an interesting script that takes the urlSearchParam from the url using window.location sink and write it to the DOM using document.write
Copy https://0a30000803cd3ef685eb0b790083001d.web-security-academy.net/product?productId=4&storeId=test
so now that we know the injection point we need to get out of the option and select tags by enclosing them respectively and then add the xss payload that will trigger the alert
Copy https://0a30000803cd3ef685eb0b790083001d.web-security-academy.net/product?productId=4&storeId=</option></select><img src=x onerror=alert(1)>