Cross site scripting
Exploit Methods: Reflected Persistent DOM Based + JSON + JQuery Data URI – MS WORD Hijack links(Script to to turn the links to open WORD document which ll be download to user machine and use user's machine.) Dangling Markup –Script less attack The attacker injects some URL to the database wit out closing tag. When the page is bound the HTML DOM all are sent to the URL that attacker has out on. In MVC, the attacker can now take the "Request Verification Token" too. Solutions: Use HTML Encode for Cross site scripting Avail user inputs to use tags and use regex to a-z only Json.Encode() or Encoder.JavaScriptEncoder() all data supplied to Java script Still vulnerable if the text is read from element and used incorrectly Audit everywhere where ever the DOM created/altered by user input Do not Encode the data to save in database, but Sanitized . Since the data is leading double encoding. Use Sanitizer. AntiXss Sanitizer's GetSafeHtml()/GetSafeH...