Guide · RabbitMQ

The RabbitMQ Security and Hardening Guide

Most RabbitMQ estates are hardened at the edge and open in the middle: TLS on the client port, nothing on inter-node distribution; a named user for the application, guest still enabled; one vhost carrying four teams. This guide takes the cluster through the nine checks in the order an assessment runs them, giving the short answer at each step and pointing to the article that owns the detail.

Tyler Eastridge

By Tyler Eastridge, Head of Operations

LinkedIn · Updated

6 min read9 sections
On this page
The nine checks

The nine checks

Run top to bottom. Anything you cannot answer in one sentence is the finding.

CheckThe questionCommon finding
1. TLS coverageWhich of the three channels are encrypted?Client port only; distribution and management in the clear
2. AccountsDoes guest still exist, and what can it reach?Enabled, and reachable once the broker is not on localhost
3. PermissionsAre configure, write and read scoped, or .*?One user with .* on everything
4. IsolationDo separate teams share a vhost?One vhost, all applications, no blast-radius boundary
5. ExposureWhich ports are reachable from where?Management UI and 25672 on a routable network
6. Patch positionWhich CVEs affect the running version?Version past community support, so no fix exists upstream
7. SecretsWhere do the cookie and credentials live?Erlang cookie in a config repo, in plain text
8. EvidenceCan you show an auditor who changed what?No definitions history, no access log retention
9. Regulated controlsDo FIPS or residency rules apply?Assumed covered by the platform, never verified

Encrypt all three channels, not just the client one

RabbitMQ carries traffic on three separate channels and each is configured independently: AMQP client connections on 5671/5672, Erlang inter-node distribution on 25672, and the management HTTP API on 15671/15672. Teams routinely enable TLS on the first and leave the other two in the clear, which means cluster replication and administrative credentials cross the network unencrypted.

Turn on TLS for all three, verify with rabbitmq-diagnostics listeners that no plaintext listener survives, and set certificate expiry monitoring. An expired inter-node certificate partitions the cluster, so it belongs on the same alerting as disk and memory.

Retire the guest account and name every user

The default guest account is restricted to localhost out of the box, which is why it survives so long: it looks harmless until the broker moves behind a load balancer, a container network or a Kubernetes service, and localhost stops meaning what it did. Delete it rather than changing its password.

Give every application its own user with its own credential, so that a rotation, a revocation or an audit question can be answered per application rather than per cluster. Human administrators authenticate separately from services.

Scope permissions instead of granting .* three times

RabbitMQ permissions are three regular expressions per user per vhost: configure, write and read. The default an application gets during development is .* on all three, which permits deleting every queue in the vhost, and it is almost never narrowed afterwards.

Scope each to the resources the application actually names. A publisher needs write on its exchange and nothing else; a consumer needs read on its queue and configure only if it declares. Getting this right is what turns a compromised application credential into a contained incident.

Use vhosts as the blast-radius boundary

A vhost is RabbitMQ's isolation unit: separate exchanges, queues, users and permissions, on shared cluster resources. Estates that put every team in the default / vhost have no boundary at all, so one team's runaway queue triggers a memory alarm that blocks every publisher on the cluster.

Give each team, environment or tenant its own vhost, and apply per-vhost limits so one cannot exhaust the cluster for the others. Isolation is a security control and an availability control in the same change.

Decide what each port may reach, then prove it

Two ports should never be reachable from a general network: 25672, which carries Erlang distribution and trusts anything holding the cookie, and 4369, the epmd port mapper. The management UI on 15672 belongs behind a VPN or an authenticating proxy, not on a public address, however strong the password is.

Write the intended reachability down as a short table, then verify it from outside the cluster with a port scan rather than from the firewall configuration. Configuration and reality diverge, and the scan is what an assessment reports.

Track CVEs against the version you are actually running

Security posture on RabbitMQ is mostly a function of version. A cluster inside the supported window takes patches on a normal cadence; a cluster past the community support window has no upstream fix for anything found after that date, whatever the scanner says the severity is.

Keep a current mapping of advisories to the version you run, and treat "no patch exists" as an architectural finding rather than a ticket. The two honest answers are upgrading, or a support arrangement that backports fixes to your series.

Treat the Erlang cookie as a cluster-wide credential

The Erlang cookie is the shared secret that authorises a node to join the cluster and issue commands against it. It is frequently checked into a configuration repository in plain text, copied between environments, or left at a value generated years ago, and anyone holding it plus network access to 25672 has full control of the broker.

Store it in the same secret manager as database credentials, make it distinct per environment, and rotate it on a schedule. Scheduled definitions exports belong in version control; the credentials inside them do not.

Produce the evidence before someone asks for it

An auditor asks three questions: who has access, what changed, and when was it patched. A cluster with no definitions history, no retained access logs and no patch record cannot answer any of them, and the assessment finding is the absence of evidence rather than a technical weakness.

Schedule definitions exports into version control so permission and policy changes carry a diff and an author, retain management access logs against the retention period your industry requires, and keep the patch record alongside the CVE mapping from step six.

Verify the regulated controls rather than assuming them

FIPS-validated cryptography, data residency and air-gapped operation are usually assumed to be handled by the platform underneath, and are usually not verified at the broker. The cipher suite RabbitMQ negotiates, the module it negotiates it with, and where messages come to rest are all broker-level questions.

Confirm them explicitly where the regime applies. It is a short exercise when the answer is yes, and a long one discovered late when the answer is no.

Frequently asked questions

How do you secure a RabbitMQ cluster?

TLS on all three channels (client, inter-node distribution, management), the guest account deleted, one named user per application with configure, write and read scoped to the resources it names, separate vhosts as the isolation boundary, ports 25672 and 4369 off any general network, the management UI behind a VPN, a current CVE mapping for the running version, and the Erlang cookie held in a secret manager.

Is the RabbitMQ guest account safe to leave enabled?

Not once the broker is reachable other than over localhost, which is true as soon as it sits behind a load balancer, a container network or a Kubernetes service. Delete the account rather than changing its password, and give each application its own credential.

What ports should RabbitMQ never expose?

25672, the Erlang distribution port, which trusts any peer holding the cookie, and 4369, the epmd port mapper. The management interface on 15672 should sit behind a VPN or an authenticating proxy rather than on a routable address.

What happens to RabbitMQ security once a version is past end of life?

No upstream patches are issued for it, so any advisory published after that date has no fix available from the project. The options are upgrading to a supported series or a commercial arrangement that backports security fixes to the series you run.

What does a RabbitMQ security audit cover?

TLS coverage across all three channels, account inventory and permission scoping, vhost isolation, port exposure verified from outside the cluster, the CVE position for the running version, secret handling including the Erlang cookie, and whether the evidence trail can answer who has access, what changed and when it was patched.

RabbitMQ services

Where this gets done

The work behind this page, run by the same engineers who wrote it.

More resources

Other RabbitMQ guides, comparisons and research

From the blog

Recent RabbitMQ articles

Next step

Need this done on your cluster?

AceMQ's senior RabbitMQ engineers support 130+ enterprise clients in 26+ countries under a 15-minute emergency SLA, with direct escalation to the RabbitMQ core team.