In-depth lesson · XSS
Root causes
Every point the XSS reports back under this heading, best-backed first, each with the reports it is seen in.
-
URL path data was inserted into the DOM without sanitising or encoding.
Seen in 3 reports
-
User input was reflected into an HTML attribute without attribute-context encoding.
Seen in 3 reports
-
User messages were rendered as HTML without escaping.
Seen in 3 reports
-
User-controlled URL content was reflected into the page without encoding or filtering HTML characters.
Seen in 3 reports
-
User-supplied request data was reflected into a page without output encoding.
Seen in 3 reports
-
Web requests were not validated or sanitised before being handled.
Seen in 3 reports
-
A first name field validated only for presence and was inserted into an email template unencoded.
-
A parameter is inserted into an HTML attribute without encoding quotes.
Seen in 2 reports
-
Medium -
Medium
-
-
A parameter was reflected into a script block without encoding.
-
A returnUrl parameter and username value were inserted into the DOM without sanitisation.
Seen in 2 reports
-
Medium -
Medium
-
-
A URL parameter was reflected into the HTML response without output encoding or validation.
Seen in 2 reports
-
A user-controlled parameter was assigned directly to the location object without validating it was an https URL.
-
A user-supplied feed URL was trusted and its response passed to eval instead of treated as inert data.
Seen in 2 reports
-
Authentication cookies lacked HttpOnly and Secure flags, and error pages disclosed cookies.
-
Backslashes were not escaped in a JavaScript string context.
Seen in 2 reports
-
The browser ignored Content-Disposition and Content-Type download directives and rendered attacker content inline on the hosting origin.
-
Client-side generation of message previews lacked server-side validation, and CSP directives were missing and the Electron version was outdated.
Seen in 2 reports
-
Components reflected or stored parameter values without validation or output encoding.
-
Content-Security-Policy allowed data: URLs for scripts or was missing entirely.
-
Echoing a search parameter into the page without output encoding or input sanitisation.
-
Editors failed to sanitise pasted HTML content, letting event handler attributes through.
-
Endpoints did not verify that the authenticated user owned the record referenced by an identifier.
Seen in 2 reports
-
Endpoints reflected user input into HTML without escaping or output encoding.
Seen in 2 reports
-
File names were inserted into error messages and listings without HTML encoding.
-
Filenames were inserted into HTML without encoding.
-
Filter checks characters after one decoding pass while the backend decodes again.
-
Filters stripped tags but not attribute values or event handlers.
Seen in 2 reports
-
Inserting user-supplied input into generated web pages without proper encoding or sanitisation.
-
JavaScript components inserted usernames into the DOM without escaping, unlike other parts of the app.
-
User-controlled settings and parameters were not output-encoded or input-filtered in several places, including site settings and an API inspector.
-
OWA did not correctly validate web requests, allowing script or content injection.
Seen in 2 reports
-
postMessage used a wildcard target origin instead of a specific domain, and the handler did not verify the sender's origin.
-
The proxy built request URLs from a client-supplied forwarded-proto header and skipped the whitelist when the path did not start with http.
-
Query parameters were inserted into a CSS context without sanitising, and old IE evaluated CSS expressions as JavaScript.
Seen in 2 reports
-
Raw filenames were concatenated into listing HTML without HTML-encoding special characters.
Seen in 2 reports
-
Report parameters were stored and rendered without HTML encoding.
Seen in 2 reports
-
Search input was reflected without output encoding or sanitisation.
Seen in 2 reports
-
Search input was reflected into a page where AngularJS was present, allowing client-side template injection.
Seen in 2 reports
-
Signature validation was tied to a path segment, so removing it let the stored file be served with an attacker-chosen content type.
-
Chat messages were stored without server-side sanitisation and rendered as raw HTML.
-
Submitted question content was saved and later rendered without output encoding or sanitisation.
Seen in 2 reports
-
SVG uploads were accepted and served without sanitising script content.
-
The 404 handler echoed the requested path into the error page without escaping.
-
The application allowed SVG uploads and served them with a content type that caused browsers to execute embedded scripts.
Seen in 2 reports
-
High -
Medium
-
-
The application fails to properly sanitise or encode user input in the comment editing feature, allowing script execution when the comment is edited.
-
The base parameter was echoed into the HTML body without output encoding, and the pages lacked frame-busting headers.
Seen in 2 reports
-
The chatbot echoed user input into the page without HTML-encoding or sanitising it.
-
The code parameter was reflected into inline JavaScript without escaping.
Seen in 2 reports
-
The Dynamics server did not properly sanitise a specially crafted web request before reflecting or storing it in a response.
-
The Editor Link preference was rendered as a clickable link without validating the URL scheme.