In-depth lesson · Cross-site WebSocket hijacking
Root causes
Every point the Cross-site WebSocket hijacking reports back under this heading, best-backed first, each with the reports it is seen in.
-
The WebSocket server did not validate the Origin header during the handshake, so connections from any website were accepted and carried the victim's session.
Seen in 15 reports
-
The handshake authenticated only on cookies and required no per-message CSRF token or other client context.
-
The collaboration socket trusted client-supplied element selectors and values, and a build feature put a user-controlled value into the request URL without validation.
Seen in 1 report
-
The local WebSocket server required no authentication and accepted connections from any origin.
Seen in 1 report
-
Login, logout and OAuth connect endpoints lacked CSRF protection and profile fields allowed stored script.
Seen in 1 report
-
The site relied on SameSite=Strict alone to stop cross-site WebSocket hijacking without checking Origin, and a sibling subdomain had reflected XSS.
Seen in 1 report
-
The authentication cookie was set with SameSite None, so cross-site connections carried the victim's session.
Seen in 1 report
-
The WebSocket token and stream were generated before any user validation and the token was hard-coded in client-side source.
Seen in 1 report
-
The WebSocket endpoint relied solely on cookies for authentication.
Seen in 1 report
-
The debug adapter neither authenticated nor authorised connections to its local TCP port and parsed HTTP framing as valid debug messages.
Seen in 1 report
-
The SCM panel set authentication cookies to SameSite None and validated the Origin header with a regex that special characters could trick.
Seen in 1 report
-
The API over-relied on the SameSite cookie attribute, used weak substring content-type validation and made incorrect CORS assumptions.
Seen in 1 report
-
The notebook server did not validate the Origin header on state-changing requests and accepted the CSRF token from a request parameter.
Seen in 1 report
-
Origin header parsing was too permissive and treated a crafted origin as an allowed host.
Seen in 1 report
-
The handshake authenticated with a user identifier instead of a cookie, so knowing the identifier was enough.
Seen in 1 report
-
The endpoint that creates the security question and answer did not require the current password and was reused to update it.
Seen in 1 report
-
The server applied the state change before or regardless of validating the CSRF token, returning an error while still committing the update.
-
User-controlled parameters were rendered as HTML without sanitisation.