I am trying to execute an XSS payload on a search field that takes my input like this:
<input name="q" id="gsasearch" type="text" value="My Input"></input>
Observations:
<
,>
and"
are filtered. However, HTML encoding these characters work.- The input is URL encoded and URL decoded and displayed to me.
- There are no parameters.
Payloads used is HTML encoded version of is qq"><script>alert('xss')</script>
.
However, all i see in the result page is qq"><script>alert('xss')</script>
.
XSS doesn't execute in both Chrome and IE. If I inspect the element, I see this:
<input name="q" id="gsasearch" type="text" value="qq"><script>alert('xss')</script>"></input>
After using F2 in dev tools, I could see that "
is getting converted to "
, as shown below:
<input name="q" id="gsasearch" type="text" value="qq**"**><script>alert('xss')</script>"></input>
So,
I/p--> URL encoded --> URL decoded --> HTML encoded if its a "
Is there any way to bypass this?