-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Insecure handling of invalid TLS certificates #2909
Comments
How can users track the progress of this issue? Why not keep this issue here open until a fix is released in Rocket.Chat stable version? |
As mentioned in the hackerone ticket, I will not further discuss this issue privately. After two years of explaining all the ins and outs of this issue and answering all your questions, including providing suggestions on how to address it, I believe I have given sufficient information. Only yesterday did you move the severity from High to Low, despite Rocket.Chat's stance on this issue in 2022 being:
Given this history, it is disheartening that an issue compromising TLS integrity is deemed low-severity. I believe that a vulnerability so likely to render TLS ineffective is inherently low-complexity yet high-risk. Since you have chosen not to engage in a public dialogue, I will conclude my involvement and retract the offer of working to submit a pull request. It is my opinion that a product marketed with "complete privacy and security" should not leave an Improper TLS Certificate Validation issue unaddressed for over two years. This undermines the product’s security claims and its suitability for use. |
I explicitly stated in the hackerone ticket that
This means for example: ISPs, anyone conntected to the same network, anyone aware of your wifi credentials, hosting providers, VPN-providers, CDNs, anyone in control of malware connected to network involved in the communication between client and server and many more can present the user with an unlimited number of dialogs such as this, completely compromising the users Rocket!Chat account including all data and privilege of that account if the user is tricked into clicking the "Yes"-Button, Spacebar or Enter: Changing the DNS is just one of many ways to exploit this vulnerability. It constitutes an Improper TLS Certificate Validation issue, where invalid certificates are presented to the user as acceptable. Consequently, trust between the client and server cannot be assured, and all user sessions must be considered compromised. I have made very detailed suggestions on how to address the issue in the hackerone ticket. |
What you describe is not the Complexity, it is the Attack Vector and the Attack Vector of this vulnerability is not Local Network or Adjacent Network but rather Network. These are the CVSS definitions: Network (AV:N)
Adjacent Network (AV:A)
Local Network (AV:L)
Such MITM vulnerabilities are generally regarded AV:N (as illustrated in the cvss examples section) as they neither require network access to be local (as would be with AV:A) nor do they require shell access or similar to either trusted party (as would be with AV:L). I am referring to the examples and definitions provided in the CVSS documentation as that is the scoring system hackerone uses https://www.first.org/cvss/ High Complexity (AC:H) is also not given as AC:H is defined as (emphasis theirs)
Further applying the definitions of CVSS including the Requirement of user interaction (UI:R) yields a score of 8.8 when assuming Low Complexity (AC:L) and a score of 7.5 when (in my opinion wrongfully) assuming High Complexity (AC:H). You have however manually changed the severity from 8.3 (High) to Low (below 3.9). |
Thank you for working on this! On my test system, "Yes" is still the default selected option. Only difference is I'm seeing is the new warning message which is an improvement. I don't believe this fully resolves the issue but as the hackerone is still open, I understand this patch is just the first step. |
Possibly related electron/electron#18258 "dialog.showMessageBox doesn't respect defaultId option on Windows" and electron/electron#22600 . It does default to "No" now on my linux. |
Search before asking
Operating System
Operating System Version
Windows 10, Arch Linux and others
It happens on the web browser too?
No, it just happens on the Desktop app
Rocket.Chat Desktop App Version
4.4.0, 3.7.5 and others
Rocket.Chat Server Version
any
Describe the bug
This vulnerability has been reported confidentially 2022-05-30 and the responsible disclosure timeline is elapsed.
Summary
Do you trust certificate "[...]"?
, allowing attackers to change the question by means of social engineering, further tricking the user to choose "Yes". (e.g.Do you trust certificate from "Microsoft" and want to keep your installation of "Windows"?
, see screenshot in comment below)Screenshots
For comparison: How Browsers handle invalid certificates when opening a site (note that in the given situation, where a secure site is already present, browsers would not even display a dialog and silently block the attack)
Firefox:
Chrome:
Impact
If a user can be tricked intro pressing the Enter key, the Spacebar key or the Yes button, an attacker could gain full control over their account.
How to Reproduce
openssl req -new -x509 -days 365 -nodes -out yourboss.pem -keyout yourboss.key -subj '/CN=your boss'
Describe your Expected behavior
When solving this issue, please consider whether it is neccessary to allow insecure TLS at all, and if so, how much work you want to put into allowing this in a secure way. I see three options:
Forbid invalid TLS-Certificates altogether, the dialog could say: "Cannot connect to Server : TLS error: ." -- no options just ok. This is how many applications handle such situations and this change would be a very easy and complete fix of this vulnerability. I believe it should still be possible to set up self-signed certificates and the such by working with the systems certificate store.
Redesign the certificate error dialog in more a secure way, minimal requirements for this are:
Implementing solution 2 will certainly be a lot of work and only be effective if all above requirements are met.
A compromise: Option one but allow skilled users/administrators to install custom trusted certificate files either via the gui or by placing them in Rocket!Chats config directory.
For a very quick mitigation: Forbid invalid TLS-Certificates altogether (who needs this anyway?) but with an opt-in to invalid certificates from the Settings dialog, make it very clear in the dialog that enabling this makes Rocket.Chat insecure
Anything else
RocketChat/Rocket.Chat#27175
1586249
Are you willing to submit a code contribution?
The text was updated successfully, but these errors were encountered: