In-depth lesson · XSS
Typical fixes
Every point the XSS reports back under this heading, best-backed first, each with the reports it is seen in.
-
Sanitise pasted HTML in comment fields.
Seen in 1 report
-
Sanitise PDF content before inserting it into the DOM during re-render.
Seen in 1 report
-
Sanitise product descriptions and escape them on the partner site.
-
Sanitise profile fields before rendering.
Seen in 1 report
-
Sanitise reflected input and stop API endpoints returning session data to any authenticated request.
Seen in 1 report
-
Sanitise rendered Markdown and add a Content Security Policy.
-
Sanitise script markup in post titles.
Seen in 1 report
-
Sanitise stored feedback and encode it in every staff-facing view.
Seen in 1 report
-
Sanitise stored HTML before rendering it in portal content settings.
Seen in 1 report
-
Sanitise SVG content and force a safe content type in the PlantUML proxy.
Seen in 1 report
-
Sanitise the alt attribute in the image link filter.
Seen in 1 report
-
Sanitise the Answer field before rendering and set SameSite protection on session cookies.
Seen in 1 report
-
Sanitise the body_html field in the API the same way as the web form.
Seen in 1 report
-
Sanitise the content type header before reflecting it in error responses.
Seen in 1 report
-
Sanitise the coupon search field and disable external entities in the XML parser.
Seen in 1 report
-
Sanitise the dst parameter and mark the authentication cookie Secure.
Seen in 1 report
-
Sanitise the email body before sending.
Seen in 1 report
-
Sanitise the file parameter and do not let another parameter set the content type to text/html.
Seen in 1 report
-
Medium
-
-
Sanitise the file title and serve JSON with a JSON content type.
Seen in 1 report
-
Sanitise the ID before displaying it in an error dialog.
Seen in 1 report
-
Sanitise the invalid webcall ID before reflecting it in error pages.
-
Sanitise the IP address field and serve stored data with a safe content type.
Seen in 1 report
-
$1,337 High
-
-
Sanitise the name field before including it in confirmation emails.
Seen in 1 report
-
$300 Medium
-
-
Sanitise the page title setting like other fields.
-
Sanitise the URL before assigning it to the root scope in AngularJS apps.
-
Sanitise the user name before placing it in an image alt attribute.
Seen in 1 report
-
Sanitise the user name before rendering it in the navigation bar.
Seen in 1 report
-
Sanitise the vlan_id parameter before inserting it into HTML.
Seen in 1 report
-
Sanitise torrent filenames before writing them into the local download page.
Seen in 1 report
-
Sanitise uploaded files, serve them with a safe type and check ownership on file identifiers.
Seen in 1 report
-
Sanitise URL parameters and location.href values before writing them into the page.
Seen in 1 report
-
Sanitise user input before evaluating it as a client-side template expression.
Seen in 1 report
-
Sanitise user-supplied text before rendering it as HTML in the autolinker library.
Seen in 1 report
-
Sanitise usernames, protect state-changing requests against CSRF and update XML parsers.
Seen in 1 report
-
Sanitise video titles on storage and escape them when rendering the video list.
Seen in 1 report
-
Sanitise wiki page titles before using them as link text.
Seen in 1 report
-
Send a Content-Type header so responses are not rendered as HTML.
-
Send an X-Content-Type-Options: nosniff header on generated script responses.
Seen in 1 report
-
Send an X-Frame-Options header to prevent clickjacking of pages that reflect input.
Seen in 1 report
-
Send the X-Content-Type-Options: nosniff header.
Seen in 1 report
-
Send the X-XSS-Protection header on all responses.
Seen in 1 report
-
Send X-XSS-Protection and set HttpOnly and Secure on cookies.
Seen in 1 report
-
Serve SVG with a safe content type or block script inside it.
Seen in 1 report
-
Serve uploaded avatars with a content security policy and a content disposition header, or disallow SVG uploads.
Seen in 1 report
-
Serve uploaded images with a non-script content type and enforce a strict content security policy.
Seen in 1 report
-
Serve uploaded SVG files with a policy that prevents embedded scripts from running.
Seen in 1 report
-
Medium
-
-
Serve uploaded SVG with a CSP and an attachment disposition.
Seen in 1 report
-
Serve user-uploaded files from a separate origin.
Seen in 1 report
-
Set a content type response header on uploaded files so browsers do not render them as active content.
-
Set the HttpOnly attribute on cookies that client-side script does not need.
Seen in 1 report