A significant vulnerability in the RabbitMQ message broker software has surfaced, raising concerns about unauthorized administrative access. This flaw, identified in the management plugin’s OAuth2 login, allows for the creation of privileged access tokens without requiring credentials, provided the management port is reachable.
Flaw Disclosure and Impact
The issue was revealed by the RabbitMQ maintainers last week, with updates 4.4.1 and 4.3.8 released as of November 16. The vulnerability, labeled GHSA-cfvg-5q96-8mhm, awaits a CVE number and is rated as Critical, scoring 9.1 on the CVSS scale. Notably, there are no known exploits of this flaw yet.
Only those RabbitMQ deployments configured with the management interface’s OAuth2 setup are vulnerable, specifically when both management and OAuth2 plugins are active with a set client secret. The extent of access granted by a minted token is contingent on the identity provider, with full administrative control possible if the provider allows administrator scopes for the broker’s client.
Technical Details and Demonstration
The vulnerability stems from a proxy within the management plugin that forwards token requests during the login process to the identity provider, as outlined in the security advisory. In compromised versions, this proxy unwittingly processes requests from unauthenticated users, appending the broker’s stored client secret to requests lacking one and retaining the requested scope.
Researcher shanz0ng demonstrated this flaw using the RabbitMQ 4.4.0 management Docker image, successfully creating a token with administrative rights without credentials. This token enabled the creation of a persistent admin account and access via AMQP, affecting all virtual hosts beyond just the management interface.
Remediation and Advisory
A fix, implemented on October 22, limits the proxy to using only the authorization_code and refresh_token grant types necessary for management login. The updated release became available on November 16, prior to the public advisory. Notably, the 4.2 branch lacks a community fix, with version 4.2.13 accessible solely through Broadcom’s commercial support, as community support concluded on July 31.
Operators unable to update immediately have two temporary solutions: removing the management.oauth_client_secret setting or deploying authentication before the management port. However, removing the client secret could disrupt login or token refresh processes with some identity providers.
The patch restricts proxy actions but does not reverse past abuses, such as already created admin accounts. The advisory does not clarify how to detect if tokens were previously minted against a broker. This vulnerability is among seven advisories released on the same day, including a high-severity cross-site request forgery and other medium and low-severity issues, all addressed by the November 16 update.
