Skip to content

RabbitMQ exposes ports with weak default secrets

High
alexmv published GHSA-p663-wxvv-2fjp Jan 25, 2022

Package

Zulip Server (Application)

Affected versions

< 4.9

Patched versions

4.9

Description

Impact

Zulip Server installs RabbitMQ for internal message passing. In all affected versions of Zulip Server, the initial installation (until first reboot, or restart of RabbitMQ) does not successfully limit the default ports which RabbitMQ opens; this includes port 25672, the RabbitMQ distribution port, which used for inter-node communication in clustered environments, as well as a local management port. RabbitMQ's default "cookie" which protects this port is generated using a weak PRNG, which limits the entropy of the password to at most 36 bits; in practicality, the seed for the randomizer is biased, resulting in approximately 20 bits of entropy.

If other firewalls (at the OS or network level) do not protect port 25672, a remote attacker can brute-force the 20 bits of entropy in the "cookie" and leverage it for arbitrary execution of code as the rabbitmq user. They can also read all data which is sent through RabbitMQ, which includes all message traffic sent by users.

Patches

This issue is fixed in Zulip 4.9.

Workarounds

Any of the following, though we strongly suggest all:

  1. Ensure that firewalls prevent access to port 25672 from outside the Zulip server
  2. Restart the rabbitmq-server service
  3. Stop rabbitmq-server, generate a new secure Erlang magic cookie in /var/lib/rabbitmq/.erlang.cookie, and restart rabbitmq-server

References

(Zulip Blog post)

For more information

If you have any questions or comments about this advisory, you can discuss them on the developer community Zulip server, or email the Zulip security team.

Severity

High
8.6
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
None
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N

CVE ID

CVE-2021-43799

Weaknesses