No Login. RabbitMQ Handed Over Admin.

No Login. RabbitMQ Handed Over Admin.

RabbitMQ is the message broker sitting behind more systems than most people realize — the quiet middleman passing messages between services, queues, and apps. A critical flaw in it, tracked as GHSA-cfvg-5q96-8mhm and rated 9.1 out of 10, let anyone who could reach its management port mint a privileged access token without a username, without a password, without anything at all.

No login. Full admin. That is the whole story.

The proxy that trusted everyone

The flaw lives in RabbitMQ’s management plugin, on deployments that use its OAuth2 login. The plugin includes a small proxy that forwards your token request to your identity provider. That is its job — and it did it for the wrong people.

In the affected versions, the proxy answered callers who had never authenticated at all — and it took the broker’s own stored client secret, the credential that identifies RabbitMQ itself to the identity provider, and added it to requests that arrived without one, passing the requested scope through unchanged. An anonymous caller could therefore get the broker to act as its own OAuth2 client and ask for a signed token carrying whatever scopes the provider was willing to grant.

Full admin depended on the identity provider granting the broker’s client admin scopes. Where it did, the stranger walked in as an admin.

Diagram: five-step attack chain. An anonymous caller reaches the management port, requests a token with no login, the OAuth2 proxy adds the broker's own client secret, a token is minted with admin scopes, and an admin account is created.
The chain: an anonymous caller reaches the management port, the proxy adds the broker’s own client secret, and a token comes back with admin scopes.

Proved on the official image

The researcher credited as shanz0ng demonstrated the flaw on the official RabbitMQ 4.4.0 management Docker image: minting a token with no credentials, confirming it carried administrator rights, creating a persistent admin account, and logging in over AMQP with the same token.

A token accepted on AMQP — RabbitMQ’s messaging protocol — reaches the queues and messages in every virtual host, not just the management interface. This was not a bug that let someone peek at a settings page. It handed over the messages themselves.

Only some deployments are exposed: the ones following the documented OAuth2 setup, with the management and OAuth2 plugins enabled and a client secret configured. If your broker never used OAuth2 login, this flaw does not apply to you. The pattern will still look familiar — it is the same shape as the Cisco Expressway flaw that turned a cookie into root, where a trusted component did the attacker’s authentication work for them.

The fix — and the catch

The fix, merged on October 22, restricts the proxy to the two grant types the management login actually uses: authorization_code and refresh_token. Fixed releases 4.4.1 and 4.3.8 have been available since November 16, eleven days before the advisory went public. No attacks have been reported, and no CVE number has been assigned yet.

It was one of seven RabbitMQ advisories published the same day, including a high-severity cross-site request forgery flaw in the management API, two medium, and three low. Upgrading to the November 16 release covers all seven.

There are two catches. The first is the 4.2 branch: there is no community fix. Version 4.2.13 is available only through Broadcom’s commercial support, and community support for 4.2 ended on July 31 — so if you are still on 4.2 without one, upgrading is the only way out. The second catch: patching closes the hole but does not undo earlier abuse. An administrator account created through the flaw is not removed by the update, and the advisory does not explain how operators can tell whether tokens have already been minted.

This is not the first OAuth2 problem in this corner of RabbitMQ. The vulnerable proxy itself arrived in the 4.3.3 release in July, added to fix OAuth2 logins failing in Safari. Two earlier OAuth flaws disclosed that same month included one that let unauthenticated callers read the same client secret and exchange it for an administrator token.

Diagram: fix decision flow. Upgrade to RabbitMQ 4.4.1 or 4.3.8 to close the flaw; if you cannot upgrade, remove the client secret; on version 4.2 there is no community fix.
Upgrade to 4.4.1 or 4.3.8. If you cannot upgrade yet, remove the client secret or put authentication in front of the management port — and hunt for tokens or accounts that should not exist. On 4.2, there is no community fix.

What to do now

If you run RabbitMQ with OAuth2 login on the management interface, treat this as patch-now:

  • Upgrade to 4.4.1 or 4.3.8. That single upgrade closes this flaw and the six other advisories published alongside it.
  • If you cannot upgrade yet, block the door. Remove the management.oauth_client_secret setting, or place authentication in front of the management port. Some identity providers need that secret for login or token refresh, so removing it can break those flows — test first.
  • Hunt for what should not exist. Administrator accounts you did not create, and tokens minted before the patch. The update will not remove an account the flaw created.
  • Check your exposure. Confirm whether your deployment actually uses the documented OAuth2 setup — management and OAuth2 plugins enabled, client secret configured. If it does not, you are not affected, but verify rather than assume. The same discipline applies to every login guarding your infrastructure: the SonicWall flaw that let attackers past MFA is a reminder that the login page is the front door.

A broker passing messages between your services should never mint its own keys for strangers. Upgrade, check for accounts that should not be there, and close the port to anyone who has not proven who they are.

Comments

This site uses Akismet to reduce spam. Learn how your comment data is processed.