← All articles

RabbitMQ vulnerability enables admin access without credentials

RabbitMQ vulnerability enables admin access without credentials

The RabbitMQ vulnerability allows anyone who can reach the message broker's management port to create privileged access tokens without credentials on deployments using OAuth2 login. OAuth2 is a system that lets an application use an identity provider to handle sign-in. The affected setup requires both the management and OAuth2 plugins to be enabled, with a client secret configured.

RabbitMQ maintainers rate the flaw Critical, scoring it 9.1 on the CVSS scale, a system used to describe the severity of security vulnerabilities. It is tracked as GHSA-cfvg-5q96-8mhm, while a CVE assignment is still pending. No attacks exploiting the issue have been reported. Fixed releases RabbitMQ 4.4.1 and 4.3.8 became available on November 16.

The problem is in a proxy included in the management plugin. A proxy passes token requests from the login process to the identity provider. In affected versions, the proxy accepts requests from callers who have not authenticated, inserts the broker's stored client secret when a request does not contain one, and forwards the requested access scope unchanged. A scope is a permission level that determines what an access token can do.

That combination lets an anonymous caller make RabbitMQ act as its own OAuth2 client and ask the identity provider to sign a token with whatever permissions the provider grants. The resulting access depends on the identity provider. Full administrator access requires a provider that grants the RabbitMQ client administrator scopes, but the impact can extend beyond the management website.

A researcher credited as shanz0ng demonstrated the issue using the official RabbitMQ 4.4.0 management Docker image. Docker is software used to run an application in a packaged environment. The demonstration minted a token without credentials, confirmed that it had administrator rights, used it to create a persistent administrator account, and then logged in over AMQP with the same token. AMQP is the messaging protocol RabbitMQ uses to exchange data. A token accepted over AMQP can reach queues and messages across every virtual host, rather than being limited to the management interface.

The fix was merged on October 22 in a pull request. It limits the proxy to the authorization_code and refresh_token grant types used by the management login. A grant type describes how an application obtains an OAuth2 token. The fixed release shipped on November 16, 11 days before the advisory became public, according to the project's release information.

There is no community fix for the 4.2 branch. RabbitMQ 4.2.13 is available only through Broadcom, which sells commercial RabbitMQ support, and community support for 4.2 ended on July 31. Operators who cannot upgrade immediately can either remove the management.oauth_client_secret setting or put authentication in front of the management port. However, the management documentation warns that some identity providers need that secret for login or token refresh, so removing it may break those functions.

Updating does not reverse earlier abuse. An administrator account created through the vulnerability remains after the update, and the advisory does not explain how operators can determine whether tokens were already minted against their broker. After patching, administrators therefore need to review accounts and access activity using the controls available in their own deployment, while recognising that the advisory leaves token detection unresolved.

The November 16 upgrade also covers six other RabbitMQ server advisories published the same day. Those include a high-severity cross-site request forgery flaw in the management API, a cross-site request forgery flaw being a trick that causes a signed-in user or service to perform an unwanted action, plus two medium-severity and three low-severity issues.

The vulnerable proxy was added in RabbitMQ 4.3.3, released in July to address OAuth2 login failures in Safari, according to the release notes. The affected 4.3 and 4.2 ranges begin with releases from that month. Two earlier RabbitMQ OAuth flaws disclosed in July included one that allowed unauthenticated callers to read the same client secret and exchange it for an administrator token. For organisations running RabbitMQ as part of website or business infrastructure, AEU-I describes its service as security-first IT, infrastructure and consulting, which is relevant when planning an upgrade and access review for systems such as this.

Also available in: DeutschItalianoShqip