It also enables you to easily search your data without having to encode values before searching and allows you to take advantage of any changes or bug fixes made to encoders. Get started with Burp Suite Enterprise Edition. No single technique will solve XSS. Stored XSS is considered the most damaging type of XSS attack. Encoding libraries often have a EncodeForJavaScript or similar to support this function. (It's free!). In order to add a variable to a HTML context safely, use HTML entity encoding for that variable as you add it to a web template. This fact makes it more difficult to maintain web application security. For example, the general rule is to HTML Attribute encode untrusted data (data from the database, HTTP request, user, back-end system, etc.) After the page's JavaScript applies this malicious URL to the back link's href, clicking on the back link will execute it: Another potential sink to look out for is jQuery's $() selector function, which can be used to inject malicious objects into the DOM. Cross-Site Scripting (XSS) is a security vulnerability which enables an attacker to place client side scripts (usually JavaScript) into web pages. This enables attackers to execute malicious JavaScript, which typically allows them to hijack other users' accounts. Fewer XSS bugs appear in applications built with modern web frameworks. An XSS attack can be used to steal sensitive information, perform unauthorized actions on behalf of the user, or even take control of the user's session. Event handlers such as onload and onerror can be used in conjunction with these elements. At a basic level XSS works by tricking your application into inserting a