ShieldPack SHIELD PACK
From 1401 onwards.

Where would you like to start?

Services, updates, and ways to contact us, all in one place

Pricing and orders →

Use the bot or chat with us—whichever you prefer

ShieldPack posts

Critical RabbitMQ OAuth2 Flaw Could Grant Admin Access Without Credentials

About 3 min read

A critical vulnerability has been discovered in the RabbitMQ message broker, a popular open-source messaging system, which allows unauthorized access to the system without credentials. The flaw, tracked as GHSA-cfvg-5q96-8mhm, is related to the OAuth2 login feature in the management plugin and can grant admin access to anyone who can reach the management port. This means that an attacker can mint privileged access tokens without needing any credentials, as long as the management plugin's OAuth2 login is enabled and a client secret is configured.
The vulnerability affects deployments that use the management plugin's OAuth2 login, with both the management and OAuth2 plugins enabled and a client secret configured. This is a specific setup, and not all RabbitMQ deployments are affected. The project maintainers have rated the flaw as Critical, with a score of 9.1 on the CVSS scale, indicating a high level of severity. Fortunately, no attacks targeting this flaw have been reported so far, and fixed releases 4.4.1 and 4.3.8 have been available since November 16, which address this issue.
The flaw is related to the proxy that forwards token requests from the login flow to the identity provider. In the affected versions, this proxy answers callers who never authenticated, adds the broker's stored client secret to requests that lack one, and passes the requested scope through unchanged. This means that an anonymous caller can have the broker act as its own OAuth2 client and request a signed token with whatever scopes the provider grants. The researcher who reported the flaw, shanz0ng, demonstrated the vulnerability by minting a token with no credentials, confirming it carried administrator rights, creating a persistent administrator account, and logging in over AMQP with the same token.
The fix for the flaw restricts the proxy to the authorization_code and refresh_token grant types the management login uses. This change was merged on October 22 and shipped in the fixed release on November 16, 11 days before the advisory went public. However, there is no community fix for the 4.2 branch, and operators who are using this version will need to rely on commercial support from Broadcom to get the fix. For operators who cannot upgrade yet, there are two interim options: removing the management.oauth_client_secret setting or placing authentication in front of the management port. However, removing the secret can break login or token refresh flows for some identity providers.
Critical RabbitMQ OAuth2 Flaw Could Grant Admin Access Without Credentials
The implications of this flaw are significant, as an administrator account created through the flaw is not removed by the update. This means that even after patching, an attacker may still have access to the system if they created an administrator account before the fix was applied. Unfortunately, the advisory does not explain how operators can determine whether tokens have already been minted against their broker, which makes it difficult for them to assess the extent of the damage. The fix only narrows what the proxy relays but does not undo earlier abuse, so operators will need to take additional steps to secure their systems.
The vulnerable proxy is a relatively recent addition to RabbitMQ, having been introduced in the 4.3.3 release in July to fix OAuth2 logins failing in Safari. The affected 4.3 and 4.2 ranges begin with releases from that month, which means that operators who are using older versions of RabbitMQ are not affected by this flaw. However, this is not the first OAuth-related flaw in RabbitMQ, as two earlier flaws were disclosed in July, including one that let unauthenticated callers read the same client secret and exchange it for an administrator token.
The discovery of this flaw is part of a larger effort to secure RabbitMQ, as the project maintainers published six other security advisories on the same day, including a high-severity cross-site request forgery in the management API, two medium-severity flaws, and three low-severity flaws. Upgrading to the November 16 release covers all of these flaws, which makes it a critical step for operators who want to ensure the security of their RabbitMQ deployments. Overall, the discovery of this flaw highlights the importance of keeping software up to date and the need for ongoing security testing and evaluation to identify and address potential vulnerabilities.

Source: The Hacker News · Cybersecurity

ShieldPack media