FreeTAKTeam / UI

FreeTAKServer Web User Interface project
MIT License
30 stars 27 forks source link

API and Websocket Keys Leakage #26

Open Securitybits-io opened 2 years ago

Securitybits-io commented 2 years ago

The WebUI leaks the RestAPI and Websocket tokens in the javascript source code! These should not be reflected back to the user as that can lead to unintended requests through for example XSS.

API Bearer Token

SourceCode_RestAPI-key

Websocket Token

SourceCode_WebSocket-key

brothercorvo commented 5 months ago

@naman108 please verify if that is still the case in the current version

naman108 commented 4 months ago

This is definitely still an issue

naman108 commented 2 months ago

I think this issue can be reasonably decomposed into three parts:

  1. insecure communications between client and server due to HTTP
  2. generic web socket key
  3. API token in text

1: insecure communications

IMO, this is probably the most relevant factor for the security conscious user as the other two pertain mostly to cases where an attacker already has access to the UI. To address this issue we would need two main changes:

naman108 commented 2 months ago

@brothercorvo @Securitybits-io what are your thought's on this?