Title: Cross-vhost Stream consumer virtual-host existence disclosure
Description:
The Stream management endpoint GET /api/stream/consumers/:vhost allows an authenticated management user with no permissions for a target virtual host to distinguish whether that vhost exists. The endpoint performs only general management authentication before checking vhost existence, returning 200 OK for an existing inaccessible vhost and 404 Not Found for an absent one. This is a low-severity cross-tenant information disclosure.
The affected handler is deps/rabbitmq_stream_management/src/rabbit_stream_consumers_mgmt.erl. It registers a vhost-scoped route but uses rabbit_mgmt_util:is_authorized/2, which verifies general management API access and does not enforce access to the vhost supplied in the URL.
resource_exists(ReqData, Context) ->
{case rabbit_mgmt_util:vhost(ReqData) of
not_found -> false;
none -> true;
_ -> true
end,
ReqData, Context}.
is_authorized(ReqData, Context) ->
rabbit_mgmt_util:is_authorized(ReqData, Context).
rabbit_mgmt_util:vhost/1 resolves the attacker-controlled :vhost path value through rabbit_vhost:exists/1. Therefore, the REST resource-existence callback exposes the result of the existence check before a vhost authorization decision is made. Later filtering of consumer records does not remove the response-status oracle.
The vhost-aware helper, rabbit_mgmt_util:is_authorized_vhost/2, delegates to user_matches_vhost/2 and check_vhost_access/4; this endpoint should use that helper instead.
The following secret Gists contain the minimal PoC and environment files:
./run_experiment.shhidden-vhost, and creates the limited management user with no vhost permissions/api/stream/consumers/hidden-vhost and /api/stream/consumers/missing-vhost with the same limited credentials200 [], while the missing-vhost control returns 404For manual execution, run ./start_environment.sh, send the two requests from the verification script with the limited credentials, and run ./stop_environment.sh afterward.
The end-to-end verification produced:
existing_inaccessible_vhost:
status: 200
body: []
missing_vhost:
status: 404
body: {"error":"Object Not Found","reason":"Not Found"}
[DEFECT-CONFIRMED] End-to-End vhost existence oracle reproduced.
[CONTROL-PASSED] Missing vhost does not produce the successful response.
Independent observations confirmed that the limited user had an empty permissions list, and the required rabbitmq_management, rabbitmq_stream, and rabbitmq_stream_management plugins were running.
An authenticated management user can enumerate known or guessable vhost names belonging to other tenants or business environments. The PoC does not read Stream consumer details, messages, credentials, or perform unauthorized vhost operations. The demonstrated impact is limited to vhost-name existence disclosure, which can reveal tenant, project, regional, or production-environment naming information.
v4.3.2 is the highest affected GitHub release verified for this report. The endpoint was also verified in v3.8.10, where the same route, general authorization call, and vhost-existence callback are present.
| Permalink | Description |
|---|---|
| https://github.com/rabbitmq/rabbitmq-server/blob/a509158b1b1e21c892a7f1dacbe0d158076dc7b8/deps/rabbitmq_stream_management/src/rabbit_stream_consumers_mgmt.erl#L38-L47 | resource_exists/2 converts the attacker-controlled path vhost into an observable exists versus not-found REST decision |
| https://github.com/rabbitmq/rabbitmq-server/blob/a509158b1b1e21c892a7f1dacbe0d158076dc7b8/deps/rabbitmq_stream_management/src/rabbit_stream_consumers_mgmt.erl#L71-L72 | is_authorized/2 invokes general management authorization instead of the vhost-aware authorization helper |