Title: RabbitMQ OAuth2 Token Proxy Flaw — Anonymous Calls Get Tokens Minted, Administrator Rights Only When the Provider Grants Them
Summary:
RabbitMQ’s maintainers published a critical advisory on November 27 (GHSA-cfvg-5q96-8mhm, CVSS 9.1, CWE-306, no CVE assigned yet) covering the management plugin’s OAuth2 token-endpoint proxy. In 4.4.0 the route serving /js/oidc-oauth/token-endpoint/<resource-server-id> was registered with no authorization step, and the forwarding code supplies the broker’s configured management.oauth_client_secret whenever the incoming request leaves it out, while everything else in the body — scope included — travels through untouched. An anonymous visitor to the management port can therefore make the identity provider issue tokens under the broker’s own confidential-client credentials. How much those tokens can do depends on the provider: administrator-level scope comes out only where the provider gives the broker’s client such scopes, as the OAuth2 guide’s reference examples do. The reporter, credited as shanz0ng, showed on the stock rabbitmq:4.4.0-management image that a setup of that kind yields a signed administrator JWT from one credential-free POST — a token that works against the management API, survives as a newly created persistent admin account, and is even accepted over AMQP, opening queue and message operations on every virtual host. Affected ranges are 4.4.0, 4.3.3 through 4.3.7, and 4.2.9 through 4.2.12. Replacement releases 4.4.1 and 4.3.8 have been available since November 16; 4.2.13 exists only through Broadcom, community support for 4.2 having ended July 31. The code fix (PR #17937) narrows the proxy to forwarding just the authorization_code and refresh_token grants. Stopgaps until you can upgrade: drop management.oauth_client_secret (bear in mind some providers need it for login or token refresh) or shield the management port behind authentication. Upgrading does not clean up any administrator account already created through the bug. No exploitation has been reported; the advisory was one of seven RabbitMQ published that day.
References: