21) Reflected XSS into a template literal with angle brackets, single, double quotes, backslash and backticks Unicode-escaped
Last updated
Was this helpful?
Last updated
Was this helpful?
As usual the first step is to analyse the application, we have a search functionnality so let's search for random string and then open the developer tools and find where the user input is located in the html
as we see our input is reflected in a template literal
JavaScript template literals are string literals that allow embedded JavaScript expressions. The embedded expressions are evaluated and are normally concatenated into the surrounding text. Template literals are encapsulated in backticks instead of normal quotation marks, and embedded expressions are identified using the ${...}
syntax.
then you can use the following payload to execute JavaScript without terminating the template literal:
and we have solved the lab