I'm working on some Reflected Cross-site scripting (XSS)
vulnerabilities on our site (php, html,...) AppSpider is reporting one I cannot resolve.
Location: javascript:alert(10829224)
Usually AppSpider lists the url with the js in it. This time it does not. It just lists the querystring: url=javascript:alert(12345)
When I try to test by adding this to the url of the page listed, I get nothing: /path/to/page.html?url=javascript:alert(12345)
If I add script tags: /path/to/page.html?url=<script>javascript:alert(12345)</script>
I get the alert popup.
Question 1- does javascript:alert()
without script tags work? viable js?
Question 2- How can I escape or prevent this type of attack?
We have code to filter out bad unicode chars (thanks: http://stackoverflow.com/questions/3466035/how-to-skip-invalid-characters-in-xml-file-using-php). It works great on nullifying the <script></script>
tags, but apparently it does not help in this case.
Thanks for any tips or tricks