# Critical RabbitMQ OAuth2 Management Token Proxy Flaw Allows Unauthenticated Admin Token Minting (GHSA-cfvg-5q96-8mhm, CVE pending)

> The RabbitMQ management plugin's OAuth2 token-endpoint proxy answers unauthenticated callers and appends the broker's stored client secret to their requests, letting an anonymous caller obtain a signed token with whatever scopes the identity provider grants. Where the provider grants the broker client administrator scopes, this yields full admin access over the management API and AMQP across all virtual hosts. Fixed in 4.4.1, 4.3.8 and 4.2.13.

- **Author:** Threadlinqs Team
- **Published:** 2026-11-30T13:21:17Z
- **Last updated:** 2026-11-30T13:21:17Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-7081
- **Card image:** https://intel.threadlinqs.com/og/threat/TL-2026-7081.png
- **ID:** TL-2026-7081
- **Severity:** CRITICAL (CVSS 9.1)
- **Category:** VULNERABILITY
- **Status:** MONITORING
- **Detections:** 9 (1 shown free below) · **IOCs:** 9
- **CVEs:** CVE-2026-57219, CVE-2026-67410

## Description

GHSA-cfvg-5q96-8mhm (no CVE assigned at publication, CWE-306 Missing Authentication for Critical Functionality) affects the RabbitMQ management plugin when deployed using the documented OAuth2 setup: management and OAuth2 plugins enabled and management.oauth_client_secret configured. The management plugin exposes a token-endpoint proxy at /js/oidc-oauth/token-endpoint/<resource-server-id> (the proof of concept uses port 15672). The proxy was added in 4.3.3 (July 2026) to fix OAuth2 logins failing in Safari.

Root cause: the route in rabbit_mgmt_dispatcher.erl is registered without an authentication context, and rabbit_mgmt_oauth_token_proxy.erl does not implement the is_authorized/3 callback that other authenticated management resources implement, so it is reachable anonymously. The proxy appends the configured client secret to requests that lack one and relays other form parameters, including scope, unchanged. An anonymous request with grant_type=client_credentials or grant_type=password can therefore cause the broker to act as its own OAuth2 client and obtain a signed JWT with attacker-chosen scope from a permissive identity provider.

Impact: the minted token works against the management HTTP API and, when placed in the SASL PLAIN password field, against the AMQP 0-9-1 listener. The reporter (shanz0ng) demonstrated, on the official 4.4.0 management Docker image, minting a token with no credentials, confirming administrator rights, creating a persistent administrator account, and logging in over AMQP with the same token, giving queue operations on any virtual host. Full admin access requires an identity provider that grants the broker client administrator scopes. Patching does not remove administrator accounts created through the flaw, and the advisory does not describe how operators can tell whether tokens were already minted.

The fix (PR #17937, merged 2026-10-22, backported to 4.3.x and 4.4.x) restricts the proxy to the authorization_code and refresh_token grant types used by the management login. Fixed releases shipped 2026-11-16; the advisory was published 2026-11-27. The 4.2 branch has no community fix (community support ended July 31); 4.2.13 is available through Broadcom commercial support. No exploitation in the wild was reported at publication. The flaw follows two OAuth flaws disclosed in July 2026 (CVE-2026-57219, an obsolete GET /api/auth endpoint leaking the client secret, and CVE-2026-67410, client secret exposure via /js/oidc-oauth/bootstrap.js).

## MITRE ATT&CK

- T1190 Exploit Public-Facing Application
- T1528 Steal Application Access Token
- T1552 Unsecured Credentials
- T1550.001 Use Alternate Authentication Material: Application Access Token
- T1136 Create Account
- T1078 Valid Accounts
- T1213 Data from Information Repositories

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**RabbitMQ OAuth2 Token Proxy Anonymous Token Minting from Non-Internal Source (GHSA-cfvg-5q96-8mhm) — Exploitation** (`TL-2026-7081-SPL-001`)

Detects POST requests to the RabbitMQ management plugin OAuth2 token-endpoint proxy (/js/oidc-oauth/token-endpoint/ plus the resource-server-id suffix) from non-RFC1918 sources. The vulnerable proxy (rabbit_mgmt_oauth_token_proxy.erl, no is_authorized/3) answers anonymous callers and appends the broker's management.oauth_client_secret, so any external POST here is a token-minting attempt; HTTP 200 responses indicate a token was likely issued (CWE-306). Behaviour-first: keys on the vulnerable route, method and source rather than a payload hash.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1190, T1528
- **Data sources:** splunk:web:access_combined, reverse_proxy_access_logs, rabbitmq_management_http
- **Severity:** critical
- **Confidence:** high

### Splunk SPL

```spl
index=web sourcetype=access_combined method=POST uri_path="/js/oidc-oauth/token-endpoint/*" earliest=-24h
| where NOT (cidrmatch("10.0.0.0/8",clientip) OR cidrmatch("172.16.0.0/12",clientip) OR cidrmatch("192.168.0.0/16",clientip))
| stats count AS requests, count(eval(status=200)) AS token_issued, values(status) AS statuses, values(uri_path) AS paths, min(_time) AS first_seen, max(_time) AS last_seen BY clientip, host
| eval severity=if(token_issued>0,"critical","high"), first_seen=strftime(first_seen,"%F %T"), last_seen=strftime(last_seen,"%F %T")
| table first_seen last_seen clientip host requests token_issued statuses paths severity
```

### Microsoft KQL

```kql
CommonSecurityLog
| where TimeGenerated > ago(24h)
| where RequestMethod =~ "POST"
| where RequestURL has "/js/oidc-oauth/token-endpoint/"
| where not(ipv4_is_private(SourceIP))
| summarize Requests=count(), FirstSeen=min(TimeGenerated), LastSeen=max(TimeGenerated), Urls=make_set(RequestURL, 10) by SourceIP, DestinationIP, DeviceVendor, DeviceProduct
| project FirstSeen, LastSeen, SourceIP, DestinationIP, DeviceVendor, DeviceProduct, Requests, Urls
```

### Sigma

```yaml
title: RabbitMQ OAuth2 Token Proxy Anonymous Token Request (GHSA-cfvg-5q96-8mhm)
id: 7c1e4a52-3b8d-4f6a-9e21-5d0a8b7c3f10
status: experimental
description: Detects POST requests to the RabbitMQ management OAuth2 token-endpoint proxy from non-internal sources. The vulnerable proxy lacks authentication and appends the broker client secret, allowing anonymous minting of privileged tokens.
references:
    - https://github.com/rabbitmq/rabbitmq-server/security/advisories/GHSA-cfvg-5q96-8mhm
    - https://github.com/rabbitmq/rabbitmq-server/pull/17937
author: Threadlinqs Team
date: 2026-11-30
tags:
    - attack.initial-access
    - attack.t1190
    - attack.credential-access
    - attack.t1528
logsource:
    category: webserver
detection:
    selection:
        cs-method: 'POST'
        c-uri|contains: '/js/oidc-oauth/token-endpoint/'
    filter_internal:
        c-ip|cidr:
            - '10.0.0.0/8'
            - '172.16.0.0/12'
            - '192.168.0.0/16'
            - '127.0.0.0/8'
    condition: selection and not filter_internal
falsepositives:
    - Legitimate OAuth2 browser logins routed through an external reverse proxy or load balancer that masks the client address (the fixed versions still serve authorization_code and refresh_token grants on this path)
    - External penetration tests or vulnerability scanners
level: critical
```

**Known false positives:**

- Legitimate OAuth2 login flows (authorization_code / refresh_token) proxied via this path when the client IP is masked by an external proxy or CDN
- Authorized external vulnerability scans or penetration tests against the management port

**Tuning notes:** Set index/sourcetype to wherever the reverse proxy or management listener access log lands and map clientip to the true client (X-Forwarded-For). Replace the RFC1918 allowlist with your actual management/jump-host ranges. On patched brokers (4.4.1/4.3.8/4.2.13) legitimate logins still hit this path, so baseline by source and add a body field check (grant_type=client_credentials|password) if request bodies are logged. Any HTTP 200 from an untrusted source on an unpatched broker should be treated as a confirmed token mint.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- RabbitMQ OAuth2 Client-Secret Recon Followed by Token Endpoint Minting (locked: unlock with TL Creds)
- RabbitMQ Management API User Creation (PUT /api/users) from Non-Internal Source (locked: unlock with TL Creds)
- Public Inbound Connection to RabbitMQ Management (15672) or AMQP (5672) Listener on Endpoint (locked: unlock with TL Creds)
- RabbitMQ Token Endpoint Request with client_credentials or password Grant (locked: unlock with TL Creds)
- RabbitMQ Management API Definitions Export or Message Fetch from Non-Internal Source (locked: unlock with TL Creds)
- Firewall Allowed Public Traffic to RabbitMQ Management and AMQP Ports (locked: unlock with TL Creds)
- RabbitMQ Administrator User Created or Tagged via Broker Log (Post-Token-Minting Persistence) (locked: unlock with TL Creds)
- RabbitMQ AMQP Connection Accepted from Non-Internal Source (Minted JWT in SASL PLAIN) (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sources

- [Critical RabbitMQ OAuth2 Flaw Could Grant Admin Access Without Credentials (The Hacker News)](https://thehackernews.com/2026/11/critical-rabbitmq-oauth2-flaw-could.html)
- [GHSA-cfvg-5q96-8mhm: Unauthenticated OAuth2 token-endpoint proxy allows anonymous privileged token minting](https://github.com/rabbitmq/rabbitmq-server/security/advisories/GHSA-cfvg-5q96-8mhm)
- [rabbitmq-server PR #17937: Improve OAuth 2 login (fix)](https://github.com/rabbitmq/rabbitmq-server/pull/17937)
- [RabbitMQ Flaws Could Leak OAuth Secrets (The Hacker News)](https://thehackernews.com/2026/07/rabbitmq-flaws-could-leak-oauth-secrets.html)
- [RabbitMQ v4.3.3 release notes](https://github.com/rabbitmq/rabbitmq-server/releases/tag/v4.3.3)
- [RabbitMQ release information](https://www.rabbitmq.com/release-information)
- [RabbitMQ security advisories index](https://www.rabbitmq.com/security)
- [RabbitMQ management plugin documentation](https://www.rabbitmq.com/docs/management)
- [CVE-2026-57219 (OSV) - RabbitMQ GET /api/auth client secret exposure](https://osv.dev/vulnerability/CVE-2026-57219)
- [CVE-2026-67410 (Tenable) - RabbitMQ OAuth2 client secret exposed via bootstrap.js](https://www.tenable.com/cve/CVE-2026-67410)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple and Gold in full, 2 calls a day on a free account): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-7081
