Critical RabbitMQ OAuth2 flaw lets anyone reaching the management port mint admin tokens
The bug (GHSA-cfvg-5q96-8mhm, CVSS 9.1) affects brokers using OAuth2 with a stored client secret. It is fixed in 4.4.1 and 4.3.8; the 4.2 branch has no community fix.
RabbitMQ maintainers have disclosed a critical flaw in the management plugin's OAuth2 login that can give an unauthenticated attacker full administrative control of a message broker. It is tracked as GHSA-cfvg-5q96-8mhm with a CVSS score of 9.1; a CVE had not been assigned at the time of reporting.
How it works
When OAuth2 is enabled, the management plugin runs a small proxy that talks to the identity provider. That proxy accepts requests from anyone, inserts the broker's own stored client secret when the request lacks one, and passes through whatever permission scope the caller asks for. The result is that an attacker who can reach the management port can obtain a privileged token without any credentials.
The researcher who reported it showed it against the official 4.4.0 Docker image, creating a persistent administrator account and then connecting over AMQP.
Who is affected
Only deployments that have the management and OAuth2 plugins enabled and a client secret configured. No attacks have been reported.
Fixes
- Fixed in 4.4.1 and 4.3.8, released November 16.
- The 4.2 branch is out of community support; a fixed 4.2.13 is available only through Broadcom commercial support.
If you cannot upgrade, the advisory suggests removing management.oauth_client_secret (which may break some identity providers) or putting authentication in front of the management port.
Upgrading does not remove any admin account an attacker may already have created, so review users and permissions after patching. The same day, the project published several other advisories, including a high-severity CSRF issue in the management API, so it is worth applying the latest release rather than a minimal fix.
Who's affected
Teams running RabbitMQ with the management UI and OAuth2 single sign-on enabled.
What to do
Upgrade to 4.4.1 or 4.3.8, keep the management port off the internet, and audit for unexpected administrator accounts.