Skip to content

Vulnerabilities & Patches

Critical RabbitMQ OAuth2 flaw lets anyone mint privileged tokens without credentials

The Hacker News reported that the flaw carries a CVSS score of 9.1 and is tracked as GHSA-cfvg-5q96-8mhm.

https://breach-signal.com/vulnerabilities/rabbitmq-oauth2-flaw-privileged-token-bypass/

Share

Key facts

  • The RabbitMQ management plugin contains a critical flaw letting anyone who reaches the management port mint privileged access tokens without credentials on OAuth2-enabled deployments.
  • The project tracks the flaw as GHSA-cfvg-5q96-8mhm and a CVE assignment is pending.
  • The project rates the flaw Critical at 9.1 on the CVSS scale.
  • No attacks targeting the flaw have been reported so far.

A critical flaw in the RabbitMQ management plugin lets anyone who can reach the management port, the port that exposes the plugin, mint privileged access tokens without credentials on deployments using OAuth2, an authorization framework that lets applications delegate logins to an identity provider, The Hacker News reported Nov. 30.

The RabbitMQ project tracks the flaw as GHSA-cfvg-5q96-8mhm, with a CVE assignment still pending, and rates it Critical at 9.1 on the CVSS scale, which measures vulnerability severity. There have been no reports of attacks targeting the flaw. The maintainers disclosed the flaw late last week.

The Hacker News reported that the management plugin relies on a proxy that forwards token requests during login flows to the identity provider, the service that confirms a user’s identity in an OAuth2 flow. In affected versions, the proxy answers unauthenticated callers, adds the stored client secret when none is sent, and forwards the requested scopes without changing them. An unauthenticated caller can trick the broker into acting as its own OAuth2 client and request a bearer token covering any scopes the identity provider grants.

What a minted token can do depends on the identity provider, and administrator access happens only when the identity provider grants administrator scopes to the broker’s client, the permissions needed to manage the broker. The flaw affects deployments that run both plugins and configure a client secret, a credential the application uses to authenticate to the identity provider, for OAuth2 management login.

Researcher shanz0ng reported the flaw and demonstrated it on RabbitMQ 4.4.0 using a management container image, an image that packages the broker for container deployment. In that demonstration, the broker issued a token with no credentials, confirmed administrator rights, created a persistent administrator account, and accepted the same token for AMQP, a messaging protocol, login. With the token accepted by AMQP, queues and messages on every virtual host, a logical partition of the broker, become reachable beyond the management interface alone.

Version 4.4.1 and version 4.3.8, the fixed releases, have been available since November 16. A fix from October 22 narrows the proxy so it only handles the authorization_code and refresh_token grant types, the methods an application uses to obtain a token, when processing management login. The project’s release information puts the fixed release’s shipping date at November 16, almost two weeks before the advisory went public.

The same day saw seven RabbitMQ server advisories published, including this one, all listed in the project’s security advisory index, its list of published security advisories. The other advisories include a high-severity cross-site request forgery in the management API, an attack that tricks a browser into sending an unwanted request, plus two medium-rated issues and three low-rated ones. Applying the November 16 release resolves all seven advisories.

Release notes show the proxy first appeared in version 4.3.3 in July, when it was added to fix OAuth2 login failures in Safari. Releases in the affected 4.3 and 4.2 lines start from July. In July, two earlier RabbitMQ OAuth flaws were disclosed, including one that let unauthenticated callers read the client secret and exchange it for administrator access.

No community fix exists for the 4.2 branch, and version 4.2.13 can be obtained only through Broadcom, which sells commercial RabbitMQ support. Community support for the 4.2 branch ended July 31.

Operators who cannot upgrade may remove the management.oauth_client_secret setting or place authentication ahead of the management port. Management plugin documentation warns that some identity providers can lose login flows and token-refresh flows when the client secret is dropped.

Applying the patch does not undo earlier abuse, and the update leaves in place any administrator account created through the flaw. The advisory gives operators no way to tell whether tokens were already minted against their broker.

Was this helpful?

Join the discussion

Please read our Comment Policy before commenting. First-time comments are held for moderation. By posting a comment you agree to our Terms of Use and Privacy Policy, which explain how your name, email address and comment are used.

Your email address will not be published. Required fields are marked *