Lucene search

HistoryOct 30, 2016 - 7:17 p.m.

Legal Robot: The websocket traffic is not secure enough


‘Cross-Site WebSocket Hijacking’ is possible, because the websocket connection is not secure (enough).
The traffic from and to the websocket can be sniffed with Chrome (see attachment), and replayed elsewhere (cross-domain). Explanation:

After opening the homepage ( a websocket is created after a HTTP request like:, with a HTTP101 (switching protocols) response, resulting in a connection wss://

This (upgrade) request can be called from an external origin.

After knowing the websocket URL, messages (captured in chrome) can be successfully sent.

For example:
Open a session: [“{"msg":"connect","version":"1","support":["1","pre2","pre1"]}”]
Ping: [“{"msg":"ping"}”]
Login: [“{"msg":"method","method":"login","params":[{"user":{"email":"[email protected]"},"password":{"digest":"082a7a2a81c2733fd03567e47e0b6d9f09d32ec80065bda9c5cd34dd1c4f9edf","algorithm":"sha-256"}}],"id":"7"}”]
It is also unnecessary, to include the password algorithm in the login message (which can be encrypted with:

A successful test with above messages using: (an online test tool).

Suggestions to fix:

  • Check the origin from the requester server-side and adjust the Origin header for the ‘upgrade’ request.
  • Add additional ‘CSRF tokens’.
  • Encrypt messages, so they cannot be intercepted in Chrome

Additional references: