Reflected XSS into HTML context with nothing encoded
Reflected XSS into HTML context with nothing encoded
Web Security Academy #1
Lab: Reflected XSS into HTML context with nothing encoded
Lab Description
Lab Level - APPRENTICE
This lab contains a simple reflected cross-site scripting vulnerability in the search functionality.
To solve the lab, perform a cross-site scripting attack that calls the alert function.
Step to Solve the Lab
- Access the lab by click on
ACCESS THE LAB. - After access the lab you will see a simple blog web page with a search functionality, also some posts
- As a normal user you can search for any blog post in the search bar.
- To solve the lab first inject some simple
HTMLand see if theHTMLis reflected as a HTML tag or the web server sanitized the payload. - I inject a simple
<i>tag and it reflected as aHTMLtag.
1
<i>R3DW4N</i>
- I confirm that the website is not able to sanitized
HTMLcodes. - Now I inject a simple Cross Site Scripting Payload
1
<script>alert("R3DW4N")</script>
Conforming Cross Site Scripting and Solve the lab
Congratulations, you solved the lab!.
- Here is the source code
And that’s it for this write-ups. If you want to connect with me, here are my social media links
I create a website where you can find more Bug Bounty Related Write-Ups. Here is the website link : Hacker-Write-Ups
Also I want to create a community where you can communicate with other hackers and much more fun stuff : We-Are-Anonymous
Assalamu alaikum wa rahmatullah.
This post is licensed under CC BY 4.0 by the author.



