Broker as Token Mint: RabbitMQ OAuth2 Proxy Flaw and Agent Message Buses

Authors: Cloud Security Alliance AI Safety Initiative
Published: 2026-12-01

Categories: Agentic AI Infrastructure Security
Download PDF
Download Markdown

Broker as Token Mint: RabbitMQ OAuth2 Proxy Flaw and Agent Message Buses

Key Takeaways

  • On November 27, 2026, the RabbitMQ maintainers published a critical advisory (GHSA-cfvg-5q96-8mhm, CVSS v4.0 9.1, no CVE assigned at publication). It describes an OAuth2 token-endpoint proxy in the management plugin that accepts requests from any unauthenticated network peer, attaches the broker’s own configured client secret, and relays the request to the identity provider [1][2].
  • When the identity provider permits the client_credentials grant for the management client and grants it administrator scopes, an anonymous attacker can mint a signed administrator token with a single HTTP request. According to the advisory, both the management API and the AMQP 0-9-1 data plane accept that token [1].
  • The affected releases are 4.4.0, 4.3.3 through 4.3.7, and 4.2.9 through 4.2.12, and the fixes are in 4.4.1, 4.3.8, and 4.2.13. Press reporting notes that 4.2.13 is available only through Broadcom commercial support [1][2][3].
  • In AI agent pipelines that use RabbitMQ for task distribution, the broker is a trust boundary. An attacker holding a data-plane administrator token could read prompts, tool outputs, and intermediate results in transit. The attacker could also inject task messages that downstream agents would treat as legitimate work, unless consumers independently verify where messages came from.
  • Patching closes the proxy but does not undo what an attacker may already have done. Operators should look for persistence such as unexpected administrator accounts, policies, shovels, and federation links, and should restrict the management client’s grant types at the identity provider [2].

Background

RabbitMQ is a widely deployed open-source message broker. Its management plugin exposes an HTTP API and web UI, by default on port 15672, for administering users, virtual hosts, queues, and policies. Since the 3.x series the broker has supported OAuth 2.0 for both the management UI and the messaging protocols [14]. With OAuth enabled, RabbitMQ accepts JWT access tokens issued by an external identity provider (IdP) and maps each token’s scopes onto broker permissions, so a single token can authorize both administrative operations and AMQP connections [1][14]. This design centralizes identity in the enterprise IdP, which simplifies credential lifecycle management and policy enforcement. It also means that any component able to obtain a token on the broker’s behalf effectively holds the keys to the broker. RabbitMQ publishes its security advisories centrally, and the management plugin has been the subject of several of them in 2026 [4].

The vulnerable component is relatively new. The Hacker News reports that the token-endpoint proxy arrived in RabbitMQ 4.3.3 in July 2026 to work around OAuth2 login failures in Safari, and that the affected 4.3 and 4.2 ranges both begin with releases from that month [2]. The 4.2.9 release therefore appears to have received the same change alongside 4.3.3. Instead of having the browser call the IdP’s token endpoint directly, the management UI sends token requests through the broker at /js/oidc-oauth/token-endpoint/<resource-server-id>, and the broker forwards them upstream. When the operator has set management.oauth_client_secret, the broker also adds the confidential client’s secret so that the IdP will accept the exchange [1]. The advisory stresses that for the confidential-client configuration, “no operator misconfiguration is involved; the affected setup is the documented one” [1].

This is not the first RabbitMQ OAuth issue of 2026 to center on the management client secret. The maintainers earlier fixed CVE-2026-57219 (GHSA-pj24-8j6m-vq9q, CVSS 8.7), in which an obsolete unauthenticated endpoint, GET /api/auth, disclosed the configured OAuth client secret. An attacker could then exchange that secret for an administrator token [5][15]. Details of that flaw were reported publicly in July, and fixes shipped in releases 4.3.0, 4.2.6, 4.1.11, 4.0.20, and 3.13.15 [5]. Around the same time, Cantina described a separate set of four advisories covering OAuth permission changes on already-open connections, topic-permission lookups, loopback-only user checks, and Direct Reply-To bindings [6]. Twice in 2026, then, the broker’s management plane has exposed a path that let unauthenticated callers use its OAuth client credential: once through disclosure and once through relay.

Security Analysis

The Mechanism: A Confidential Client Acting for Anyone

The advisory traces the flaw to two properties of the proxy module at tag v4.4.0. First, the route is registered in the management dispatcher without an authentication context, and the handler module does not implement Cowboy’s is_authorized/3 callback, so any caller that can reach the management listener can invoke it [1]. Second, the inject_client_secret function appends the configured management.oauth_client_secret to the request body whenever the caller has not supplied one, while “all other caller-supplied form parameters (including scope) are relayed verbatim” [1]. The result, in the advisory’s words, is that the broker “acts as a confidential OAuth2 client on behalf of any anonymous network peer” [1].

OAuth 2.0’s client credentials grant exists for machine-to-machine authentication, where the client’s own credentials are the only proof required [7]. The proxy turns that grant into an open relay. An attacker sends grant_type=client_credentials with the management client’s public identifier, the broker supplies the secret, and the IdP returns a signed JWT for whatever scopes the attacker requested. The reporter demonstrated a four-step chain against the official rabbitmq:4.4.0-management image. A single unauthenticated POST to the proxy returned an access token, and a call to /api/whoami confirmed that it carried the administrator tag. A PUT /api/users/poc then created a persistent administrator account. Finally, an AMQP connection that presented the JWT as the SASL PLAIN password gained full queue operations on every virtual host [1]. The advisory adds that the password grant can be relayed in the same way wherever the IdP permits it [1].

The fact that both planes accept the token deserves emphasis. According to the advisory, the OAuth2 auth backend’s audience validation “only resolves a resource server and is not bound to the listening plane,” so a token minted through a management-UI flow is equally valid for AMQP [1]. The OAuth 2.0 Security Best Current Practice recommends restricting access tokens to the specific resource servers and privileges they are intended for, so that a token leaked or misused in one context cannot be replayed in another [8]. Here, a management-plane flaw becomes a data-plane compromise because the token carries no record of which interface it was issued for. The table below summarizes the advisory’s key attributes.

Attribute Detail
Advisory GHSA-cfvg-5q96-8mhm; CVE pending at publication [1][3]
Severity Critical; CVSS v4.0 9.1 (official); reporter-proposed CVSS 3.1 9.8 [1][3]
Weakness CWE-306, Missing Authentication for Critical Function [1]
Vulnerable endpoint POST /js/oidc-oauth/token-endpoint/<resource-server-id> on the management listener [1]
Affected versions 4.4.0; 4.3.3–4.3.7; 4.2.9–4.2.12 [1][3]
Fixed versions 4.4.1; 4.3.8; 4.2.13 (commercial support only for 4.2) [1][2][3]
Fix behavior Proxy relays only authorization_code and refresh_token grants [1]
Preconditions Management and OAuth2 backend plugins enabled; management.oauth_client_secret set; IdP grants admin scopes to the management client via a relayable grant [1]
Exploitation status No in-the-wild exploitation reported as of November 30, 2026 [2][3]

Preconditions and Exposure

Exposure is limited to a specific configuration, but it is the documented confidential-client configuration rather than an unusual misconfiguration [1]. Brokers that use only internal username and password authentication are not exposed to this flaw. Neither are brokers that configure the management UI as a public OAuth client with no client secret, because the proxy then has no secret to inject [1]. The deciding factors are whether a client secret is configured and how the IdP has registered the management client. If the IdP allows only the authorization code flow for that client, it should reject a relayed client_credentials request. If the IdP permits client credentials, as can happen when one client registration is reused for automation as well as for the UI, the attack succeeds. The advisory calls this condition a “permissive identity provider” [1]. In practice, the IdP’s client policy is serving as the last line of defense for an authentication gap in the broker.

The fixed releases restrict relaying to the authorization_code and refresh_token grants [1]. The advisory notes that two adjacent questions were handled separately: whether IdPs should detect fabricated code or refresh-token relays, and an issuer-validation improvement placed on the maintainers’ backlog [1]. Defenders should therefore treat the patch as closing the demonstrated path, not as proof that the proxy cannot be abused in other ways. The documented workaround, which is to remove management.oauth_client_secret or to place authentication in front of the management port, has its own cost. The Hacker News notes that RabbitMQ’s documentation acknowledges that some IdPs require the secret for login or token refresh, so removing it may break those flows [2].

Why the Message Bus Matters for Agent Pipelines

Message brokers are a common building block in distributed task systems, and frameworks such as Celery support RabbitMQ as a first-class broker [9]. Teams building multi-agent systems on this pattern use queues to fan work out to tool-executing workers, to pass intermediate results between planner and executor agents, and to buffer requests to model APIs. In such architectures, a message on a queue is effectively an instruction. A worker that dequeues a task executes it with whatever credentials, tool access, and network reach that worker holds. Unless the consumer independently verifies who produced the message, the broker’s access control may be the only gate between “able to publish to this queue” and “able to direct an agent’s actions.”

An attacker who mints a data-plane administrator token gains three capabilities that matter for agent pipelines. The first is a loss of confidentiality. Agent task payloads can contain user prompts, retrieved documents, tool outputs, and sometimes embedded credentials or session tokens, and an administrator can bind new queues to existing exchanges to copy that traffic silently. The second is a loss of integrity. Injected messages that conform to the pipeline’s schema are, from the consuming agent’s perspective, indistinguishable from legitimate work. This opens a path to direct task injection that can bypass prompt-level guardrails when those controls sit only in front of user-facing interfaces. The third is persistence. Administrative access lets the attacker create accounts, alter policies, and, where the shovel or federation plugins are enabled, configure links that continuously forward messages to infrastructure the attacker controls. These artifacts survive an upgrade. The Hacker News notes that patching does not remove administrator accounts that have already been created, and that the advisory offers no way to determine whether tokens were minted before the fix [2].

This pattern echoes CSA’s earlier analysis of the MCP Python SDK OAuth flaw [11]. In both cases, a component sitting between agents and identity providers trusted unauthenticated or self-asserted input and then exercised a privileged credential on that input’s behalf. The RabbitMQ case extends the pattern from the protocol layer to the transport layer that many agent systems depend on.

Recommendations

Immediate Actions

Organizations should first determine whether they are exposed. Exposure requires a RabbitMQ version in the affected ranges, the management and OAuth2 backend plugins enabled, and a non-empty management.oauth_client_secret. Exposed brokers should be upgraded to 4.4.1 or 4.3.8. Organizations on the 4.2 line should either obtain 4.2.13 through Broadcom support or move to a supported community branch, since community support for 4.2 ended on July 31, 2026 [2]. Where an upgrade cannot be completed immediately, the management listener should be removed from any network that untrusted parties can reach and placed behind an authenticating reverse proxy or VPN, consistent with the advisory’s workaround [1]. Teams that can tolerate the change should remove the client secret, as the advisory’s workaround describes [1][2]. They can then reconfigure the management UI as a public client using the authorization code flow with PKCE, after confirming that their IdP supports that flow.

In parallel, identity teams should review the management client’s registration at the IdP. Restricting that client to the authorization code grant, and removing administrator scopes from any grant that does not involve an interactive user, removes the exploitable precondition regardless of the broker version. This control is valuable precisely because it is enforced outside the vulnerable component.

Short-Term Mitigations

Because patching does not remove persistence, every broker that was exposed while vulnerable should be treated as potentially compromised until a review shows otherwise. That review should enumerate users and their tags to find unexpected administrator accounts, such as the poc-style account in the reporter’s demonstration [1]. It should inspect policies, operator policies, shovels, federation upstreams, and recently created bindings on sensitive exchanges. It should also check broker connection logs for JWT-authenticated AMQP sessions that do not match known workload identities. On the IdP side, teams should search token issuance logs for client_credentials (or password) grants issued to the management client ID. Any such issuance is anomalous if the client is meant to serve only interactive logins. Where indicators are found, operators should rotate the management client secret, revoke tokens or shorten token lifetimes for the affected client, and review the downstream agents that consumed messages during the exposure window.

Agent pipeline owners should also reduce the blast radius of any future broker compromise. Separate virtual hosts and distinct broker identities for each agent role prevent one token from reaching every queue, and shorter token lifetimes limit the usefulness of a stolen credential. Where the IdP supports it, the management and messaging planes should be configured as distinct resource servers with distinct audiences, in line with the audience-restriction guidance in RFC 9700 [8].

Strategic Considerations

A broader implication is that agent pipelines should not treat transport-layer access as proof that a message is authentic. When a queued task can direct an agent to call tools, move data, or spend money, the message itself should carry verifiable provenance. Producers can sign task payloads or include an identity assertion that consumers validate before acting. This applies the same zero-trust principle used for agent tool calls to the asynchronous fabric that connects agents. High-consequence tasks arriving over a queue should face the same policy checks and human-approval thresholds that would apply to a direct request.

Organizations should also include brokers in their inventory of non-human identities. A broker configured as a confidential OAuth client is itself a privileged non-human identity, and its secret, IdP grant types, and scopes deserve the same lifecycle governance as any service account. The two 2026 RabbitMQ advisories that let unauthenticated callers exercise the management client secret, one by disclosing it and one by relaying it, suggest that this credential warrants dedicated monitoring rather than set-and-forget configuration [1][5]. Finally, vendors and open-source maintainers who add convenience proxies to work around browser limitations should treat any server-side component that attaches a secret to a caller’s request as a security-critical authentication boundary. Such components should enforce an explicit allowlist of permitted grant types from the start.

CSA Resource Alignment

CSA’s research note AI Agent Identity Sprawl: The Enterprise Authorization Crisis [10] documents how credential accumulation, attribution collapse, and multi-protocol trust gaps leave autonomous agents among the least audited identities in the enterprise. The RabbitMQ flaw is a concrete example of the multi-protocol trust gap that paper describes. A token minted through an HTTP management flow is honored on the AMQP plane, and the resulting actions cannot be attributed to any legitimate agent identity. That paper’s recommendations on scoped permissions, bounded autonomy, and per-agent identity apply directly to how brokers and their consumers should be provisioned. Building on that work, CSA’s Non-Human Identity Management for Agentic AI: Extending IAM Beyond Humans [16] addresses the governance of machine credentials such as the broker’s OAuth client registration, and supports the recommendation to manage that registration as a privileged non-human identity.

The MCP Python SDK OAuth Flaw and the Cost of Implicit Trust [11] analyzes a September 2026 vulnerability in which an agent-side OAuth component trusted unverified input and exposed client secrets and authorization codes. Read together, the two notes show the same structural weakness in different layers of the agent stack. Intermediary components that broker OAuth exchanges for agents become high-value targets, and their implicit trust assumptions need to be replaced with explicit authentication and issuer or grant-type validation.

The CSA AI Controls Matrix (AICM) v1.1 [12] provides the control framework for putting these recommendations into practice. Its Identity and Access Management domain covers least-privilege scoping, credential lifecycle, and strong authentication for non-human identities, all of which apply to the broker’s OAuth client registration. Its Threat and Vulnerability Management domain covers the patching and exposure-review steps. For threat modeling, CSA’s MAESTRO framework for agentic AI [13] treats its Deployment and Infrastructure layer and its Agent Ecosystem layer, where inter-agent communication is modeled, as distinct attack surfaces. Message-bus compromise and task injection through the broker should be modeled explicitly at those layers rather than dismissed as “internal” traffic.

References

[1] RabbitMQ. “Unauthenticated OAuth2 token-endpoint proxy allows anonymous privileged token minting (GHSA-cfvg-5q96-8mhm).” GitHub Security Advisory, November 27, 2026.

[2] Khandelwal, Swati. “Critical RabbitMQ OAuth2 Flaw Could Grant Admin Access Without Credentials.” The Hacker News, November 30, 2026.

[3] Brandefense. “RabbitMQ OAuth2 Proxy Flaw Can Issue Privileged Tokens.” Brandefense Security News, November 30, 2026.

[4] RabbitMQ. “Security.” RabbitMQ Documentation, accessed December 1, 2026.

[5] Lakshmanan, Ravie. “RabbitMQ Flaws Could Leak OAuth Secrets and Expose Cross-Tenant Queue Metadata.” The Hacker News, July 14, 2026.

[6] Cantina. “What Four RabbitMQ Advisories Reveal About Broker Security Boundaries.” Cantina Blog, July 14, 2026.

[7] Hardt, D., Ed. “The OAuth 2.0 Authorization Framework, Section 4.4: Client Credentials Grant (RFC 6749).” IETF, October 2012.

[8] Lodderstedt, T., et al. “Best Current Practice for OAuth 2.0 Security (RFC 9700).” IETF, January 2025.

[9] Celery Project. “Using RabbitMQ.” Celery Documentation, accessed December 1, 2026.

[10] Cloud Security Alliance. “AI Agent Identity Sprawl: The Enterprise Authorization Crisis.” CSA AI Safety Initiative, June 2026.

[11] Cloud Security Alliance. “The MCP Python SDK OAuth Flaw and the Cost of Implicit Trust.” CSA AI Safety Initiative, September 30, 2026.

[12] Cloud Security Alliance. “AI Controls Matrix (AICM) v1.1.” Cloud Security Alliance, 2026.

[13] Huang, Ken. “Agentic AI Threat Modeling Framework: MAESTRO.” Cloud Security Alliance, February 6, 2025.

[14] RabbitMQ. “OAuth 2.0 Authentication Backend.” RabbitMQ Documentation, accessed December 1, 2026.

[15] RabbitMQ. “Unauthenticated disclosure of OAuth client credentials via an HTTP API endpoint with certain less common OAuth 2 configurations (GHSA-pj24-8j6m-vq9q).” GitHub Security Advisory, June 24, 2026.

[16] Cloud Security Alliance. “Non-Human Identity Management for Agentic AI: Extending IAM Beyond Humans.” Cloud Security Alliance, 2026.

← Back to Research Index