=

04 - DOM XSS in innerHTML sink using source location.search

This lab contains a DOM-based cross-site scripting vulnerability in the search blog functionality. It uses an innerHTML assignment, which changes the HTML contents of a div element, using data from location.search.

To solve this lab, perform a cross-site scripting attack that calls the alert function.

Given - XSS in search blog, type(DOM)
End goal - call alert function


As usual , start the lab and search for any keyword. I searched 'cs' -

search

Now this time our keyword is getting inside into another tag.

source

Script tag is not allowed. So another payload can be - <svg onload="alert(4)"></svg>

search

Lab solved :
search