Security & privacy

Critical RabbitMQ OAuth2 flaw allows unauthenticated admin access

A critical vulnerability in RabbitMQ lets anonymous users mint admin tokens via the management plugin. Patch to versions 4.4.1 or 4.3.8 immediately.

Illustration of an open server rack with a broken lock symbolizing a security vulnerability
Illustration generated for this article

RabbitMQ maintainers have disclosed a critical security vulnerability that allows unauthenticated attackers to gain administrative access to message brokers. The flaw, rated 9.1 on the CVSS scale, affects deployments using the management plugin with OAuth2 authentication enabled. Fixed versions were released on November 16, and operators are urged to upgrade immediately to prevent unauthorized token minting.

What happened

The vulnerability exists in the OAuth2 implementation of the RabbitMQ management plugin. It allows any network actor who can reach the management port to request privileged access tokens without providing credentials. The issue specifically impacts configurations where both the management and OAuth2 plugins are active and a client secret is configured for the identity provider integration. While no active exploits have been reported yet, the severity rating indicates that successful exploitation grants full control over the broker.

The flaw was discovered by a researcher credited as shanz0ng, who demonstrated the attack vector on the official RabbitMQ 4.4.0 management Docker image. The demonstration showed that an anonymous caller could mint a valid token, confirm it carried administrator rights, create a persistent administrator account, and then log in over AMQP. This access extends beyond the management interface, allowing the attacker to interact with queues and messages across all virtual hosts. The project tracks this issue under GHSA-cfvg-5q96-8mhm, with a CVE assignment currently pending.

Fixed releases 4.4.1 and 4.3.8 have been available since November 16. The patch was merged on October 22, meaning the fix was ready eleven days before the public advisory. This release also addresses six other security advisories published simultaneously, including a high-severity cross-site request forgery in the management API. Upgrading to the latest version resolves all seven issues at once.

How it works

The root cause lies in a proxy component within the management plugin. This proxy was introduced in version 4.3.3 in July to resolve OAuth2 login failures in Safari browsers. Its job is to forward token requests from the user’s login flow to the configured identity provider. In the vulnerable versions, this proxy fails to verify if the caller has authenticated. Instead, it accepts requests from anyone, injects the broker’s stored client secret into the request if one is missing, and passes the requested scope through unchanged.

This behavior effectively allows an anonymous attacker to impersonate the broker itself. By sending a request to the proxy, the attacker triggers the broker to act as its own OAuth2 client. The broker then contacts the identity provider, presents its own client secret, and requests a signed token with whatever scopes the attacker specified. If the identity provider is configured to grant administrator scopes to the broker’s client ID, the resulting token provides full administrative privileges.

The fix restricts the proxy to only handle authorization_code and refresh_token grant types, which are the specific flows used by the management login interface. This prevents the proxy from processing arbitrary token requests that do not follow the standard authentication handshake. However, the patch does not automatically remove any administrator accounts or tokens created by previous exploits. Operators must manually audit their systems for unauthorized changes.

Key details

  • Affected versions: RabbitMQ 4.3.x (from 4.3.3) and 4.2.x (from 4.2.13 onwards).
  • Fixed versions: 4.4.1 and 4.3.8, released on November 16.
  • Prerequisites: Management plugin and OAuth2 plugin must be enabled, with a client secret configured.
  • Impact: Unauthenticated users can mint admin tokens, create persistent admin accounts, and access AMQP data.
  • Legacy support: No community fix exists for the 4.2 branch; version 4.2.13 is available only via Broadcom commercial support.
  • Mitigation: If upgrading is not possible, remove the management.oauth_client_secret setting or place external authentication in front of the management port.

Why it matters

For teams building distributed systems, RabbitMQ often serves as the central nervous system for asynchronous communication. A compromise here does not just mean lost messages; it means potential data exfiltration, service disruption, or injection of malicious commands into downstream services. The fact that the exploit works over AMQP means the attacker bypasses web-layer protections and interacts directly with the core messaging protocol. This level of access is difficult to detect through standard web application firewalls.

The vulnerability highlights the risks of complex authentication integrations in infrastructure components. The proxy was added to improve user experience for Safari users, but it inadvertently opened a backdoor by trusting unvalidated inputs. This serves as a reminder that convenience features in security-sensitive modules require rigorous threat modeling. Since the flaw depends on the identity provider’s configuration, the impact varies by environment, but the default assumption should be that full admin access is possible.

Additionally, the lack of a community fix for the 4.2 branch poses a challenge for organizations on long-term support cycles. With community support ending on July 31, teams running 4.2 must either purchase commercial support from Broadcom to get the patched 4.2.13 version or migrate to a newer branch. This fragmentation increases the operational burden during incident response.

What you can do

  • Upgrade immediately to RabbitMQ 4.4.1 or 4.3.8 if you use the management plugin with OAuth2.
  • Audit your RabbitMQ instances for unknown administrator accounts created after July 2026.
  • If you cannot upgrade, remove the management.oauth_client_secret configuration key as a temporary mitigation.
  • Place a reverse proxy with strong authentication in front of the RabbitMQ management port if removing the secret breaks your login flow.
  • Review identity provider settings to ensure the broker’s client ID does not have unnecessary administrator scopes.
  • Monitor network logs for unusual token requests or AMQP connections from unexpected sources.
  • #rabbitmq
  • #security
  • #oauth2
  • #devops
  • #vulnerability

Tools from the Bytechap store

Keep reading

All stories