Live data from Hacker News

Zulip Cloud security vulnerability with reusable invitation links

blog.zulip.com

31–38 of 38 posts

Re: Zulip Cloud security vulnerability with reusable invitation links

#31
post #30
post #27

Earlier quoted context omitted.

As a side note, I'm surprised that this specific security disclosure ended up on the Hacker News homepage, while our security release about an RCE issue affecting self-hosted Zulip servers last month did not ( https://blog.zulip.com/2022/01/25/zulip-server-4-9-security-... ). The core bug there an insecure secret generation algorithm in upstream Erlang/RabbitMQ, which seems more broadly notable to me! Despite our spe…

The blog post tries to paint the RabbitMQ cookie generation as a security issue, but the Erlang distribution cookie is NOT a security feature. Indeed, the Erlang documentation states: > "Security" here does not mean cryptographically secure, but rather security against accidental misuse, such as preventing a node from connecting to a cluster with which it is not intended to communicate. The purpose of the cookie is t…

That argument would hold more water if there were an additional security mechanism in place preventing `apt install rabbitmq-server` from exposing a system to a remote code execution. It seems to be that the simplest fix for this problem is to make the cookie secure, since doing so is likely effective with minimal effort. Another option would be to have clustering disabled by default.

If you'd like to summarize the upstream issue as "RabbitMQ as well as every distributors of it that we've investigated allows remote execution of arbitrary code on your server through having no effective access control mechanism for the distribution port, which is open by default after installing the software.", that summary is defensible.

That still sounds to me like a critical security issue. One should be very disappointed in a vendor that had not patched years after its public disclosure, especially given the context that we're apparently not first project using RabbitMQ to be affected by these security choices by Erlang and RabbitMQ. See, for example, https://nvd.nist.gov/vuln/detail/CVE-2018-1279, back in 2018. We definitely won't be the last, either.

I hope nobody is going to argue that it's reasonable to publish server software with a "documented" RCE vulnerability, especially if you don't make any effort to highlight that detail. https://www.rabbitmq.com/access-control.html, the main page about access control in RabbitMQ, does not even mention this security concern; you have to read their clustering guide, which should be irrelevant to anyone not intending to use RabbitMQ clustering.

Re: Zulip Cloud security vulnerability with reusable invitation links

#32

Is anyone using Zulip and has it made a difference to Slack for example?

I used it at a previous job and it was fantastic. The first-class threads are the way chat should work, the UX with the message river is brilliant, the keyboard shortcuts make everything two keystrokes away and it's extremely fast.

In comparison, I hate having to use Slack every day today. It's slow as shit, whenever I type a keystroke too fast (e.g. editing a previous message) it always gets into a weird state (usually edits the message before last and messes up the edits) and it encourages rapid-fire, thoughtless replies. Search also sucks and it's impossible to find anything. I fucking hate Slack.

Re: Zulip Cloud security vulnerability with reusable invitation links

#33
We use Zulip at work with about 70 daily active users. We evaluated other popular competitors both open source and paid. Zulip came out on top because it was spot on with our use case and integrated easily with our infrastructure. Since we rolled it out (about a year ago) it has been the most stable application in our environment- it is rock solid. Thank you Zulip Team for all of your hard and excellent work.

Re: Zulip Cloud security vulnerability with reusable invitation links

#34
post #9

Zulip in Docker¶ Zulip has an officially supported, experimental docker image. Please note that Zulip’s normal installer has been extremely reliable for years, whereas the Docker image is new and has rough edges, so we recommend the normal installer unless you have a specific reason to prefer Docker. [0] A server application without Helm charts? Stateful apps without Kubernetes Operator? For someone living with k8s a…

I see it as "this is the official way that the project uses to host, and they have been kind enough to share it with you".

I don't think Zulip themselves use Helm charts or Kubernetes Operators to host their instances. If you think hosting an instance without these is such a pain, why not just pay them to manage it for you? At least you got the option to self-host, which is not something you'll ever get with Slack.

Re: Zulip Cloud security vulnerability with reusable invitation links

#35
post #31
post #30

Earlier quoted context omitted.

The blog post tries to paint the RabbitMQ cookie generation as a security issue, but the Erlang distribution cookie is NOT a security feature. Indeed, the Erlang documentation states: > "Security" here does not mean cryptographically secure, but rather security against accidental misuse, such as preventing a node from connecting to a cluster with which it is not intended to communicate. The purpose of the cookie is t…

That argument would hold more water if there were an additional security mechanism in place preventing `apt install rabbitmq-server` from exposing a system to a remote code execution. It seems to be that the simplest fix for this problem is to make the cookie secure, since doing so is likely effective with minimal effort. Another option would be to have clustering disabled by default. If you'd like to summarize the u…

> RabbitMQ as well as every distributors of it that we've investigated allows remote execution of arbitrary code on your server through having no effective access control mechanism for the distribution port, which is open by default after installing the software.

This is exactly how I would word the issue. If an attacker can talk to the Erlang distribution port with nothing but the cookie preventing them, then the system is already lost. That should never happen, the distribution ports should only be open on an isolated internal network for the other cluster members.

If RabbitMQ opens these ports by default and does not document the issue clearly, then that is the failing. I don't think fixing whatever random number generator is generating the cookie will make the system secure enough to be considered fixed. At worst it may give a false sense of security when in reality the fix has been made in the wrong location.

Re: Zulip Cloud security vulnerability with reusable invitation links

#36

Is anyone using Zulip and has it made a difference to Slack for example?

Clojurians-Zulip is much better interface to catch up and read through existing information than Clojurians-Slack ever was (Clojurians is basically bunch of Clojure(Script) people helping/getting help from each other), for whats it worth. Best would be if they both could be fully public, but for now the archives seems to do the job well at least.

Zulip is working on having public view of streams without having an account. It's already being experimently deployed on the Zulip Dev's server.So that should make its way to other consumer servers soon!

Re: Zulip Cloud security vulnerability with reusable invitation links

#37
post #35
post #31

Earlier quoted context omitted.

That argument would hold more water if there were an additional security mechanism in place preventing `apt install rabbitmq-server` from exposing a system to a remote code execution. It seems to be that the simplest fix for this problem is to make the cookie secure, since doing so is likely effective with minimal effort. Another option would be to have clustering disabled by default. If you'd like to summarize the u…

> RabbitMQ as well as every distributors of it that we've investigated allows remote execution of arbitrary code on your server through having no effective access control mechanism for the distribution port, which is open by default after installing the software. This is exactly how I would word the issue. If an attacker can talk to the Erlang distribution port with nothing but the cookie preventing them, then the sy…

> false sense of security

You don’t think a random generator that looks like it outputs log₂(26²⁰) ≈ 94 bits of entropy, but is limited by the weak PRNG state space to 36 bits, and further limited by poor seeding to about 20 bits, creates a false sense of security?

(Source: https://github.com/gteissier/erl-matter)

It would be entirely possible to generate a cookie that gives true security. It would also be possible to generate no cookie at all and force the administrator to become aware of the issue if they want to enable clustering. It would also be possible to limit the exposure to localhost only by default.

But Erlang does none of these things. It generates a weak cookie that looks like a strong cookie, leaves it in a hidden file that the administrator may never even become aware of, and exposes a daemon that relies on it for security to the internet by default.

This is not how you build a secure system. This is not even how you build a system to get the administrator to realize that it needs to be secured. This goes against every security best practice that’s been written and some that are so obvious they shouldn’t need to be written. This is irresponsible and inexcusable in today’s environment, and hardly even excusable in the environment that Erlang was originally written for. This needs to be treated as the serious vulnerability that it is, and needs to be fixed.

Re: Zulip Cloud security vulnerability with reusable invitation links

#38
post #35

Earlier quoted context omitted.

> RabbitMQ as well as every distributors of it that we've investigated allows remote execution of arbitrary code on your server through having no effective access control mechanism for the distribution port, which is open by default after installing the software. This is exactly how I would word the issue. If an attacker can talk to the Erlang distribution port with nothing but the cookie preventing them, then the sy…

> false sense of security You don’t think a random generator that looks like it outputs log₂(26²⁰) ≈ 94 bits of entropy, but is limited by the weak PRNG state space to 36 bits, and further limited by poor seeding to about 20 bits, creates a false sense of security? (Source: https://github.com/gteissier/erl-matter ) It would be entirely possible to generate a cookie that gives true security. It would also be possible…

> You don’t think a random generator that looks like it outputs log₂(26²⁰) ≈ 94 bits of entropy, but is limited by the weak PRNG state space to 36 bits, and further limited by poor seeding to about 20 bits, creates a false sense of security?

I don't think so, as the Erlang documentation states that 1) the distribution protocol is in plaintext, 2) the cookie is not secure in the cryptographic sense, but in the sense that it will prevent accidents, and 3) the cookie handshake is not cryptographically secure.

It is not possible to generate a cookie that provides any true security as the distribution protocol is plaintext and the cookie handshake is not secure. Claiming to get any security benefit from a "stronger" cookie would only give a false idea to the user.

Erlang does not start distribution by default. This is done by the user of Erlang, or the application that runs on Erlang. It is up to them to make sure that their environment is secure and that they understand how Erlang distribution works. Namely, to not open ports in the firewall willy nilly and only allow communication to them from an isolated network or over TLS. Frankly I don't know what you would expect Erlang to do here, maybe to add even bigger warnings to the documentation?

The problem here is application developers not understanding how to configure their application to be secure by default. They are the ones opening the distribution wide to the Internet and not advising their users on how to do it safely, not Erlang.

Post reply on HN