I have a web site where users can enter some text into a textbox and that text is immediately rendered in a div using javascript (strictly front end). If a user enders something like this:
This is my text<script>alert('test');</script>
It will render that content in the div and show the alert. When the user saves the record everything is HTML encoded when it gets to the server and then saved to the database, so there is no stored XSS vulnerability.
My question is if the act of rendering the contents of the textbox on the client side could pose any kind of threat? If so, what could a malicious user do?
this
meaningalert(1)
to me). that input field could be used for reflected xss.