Summary
RabbitMQ improperly authorizes foreign bindings to special amq.rabbitmq.reply-to destinations, allowing route entries to persist after volatile queues are unbound and deleted.
Under certain broker configurations, this can let an attacker abuse reply-to routing behavior to inject or intercept messages beyond intended authorization boundaries.
Affected context
This vulnerability appears in RabbitMQ deployments that use direct-reply-to semantics (amq.rabbitmq.reply-to) with Khepri-backed storage for routing metadata.
It is relevant when volatile direct-reply-to queues are created and destroyed dynamically, and where authorization or routing rules rely on bindings being fully removed upon unbind or deletion.
Environments that expose reply-to destinations to multiple tenants, services, or untrusted producers are more at risk because residual route entries can alter expected isolation between messaging paths.
Exploit preconditions
- Attack surface: AMQP or compatible RabbitMQ client interactions involving
amq.rabbitmq.reply-todestinations. - Required access: Ability to connect as a client and create, bind, and unbind queues and exchanges that interact with reply-to destinations.
- Trigger point: Binding foreign queues or routes to
amq.rabbitmq.reply-toand then unbinding or deleting volatile queues, leaving persistent route entries. - Why exploitation is possible: The Khepri-backed deletion checks do not account for volatile direct-reply-to queues, so routing metadata for certain bindings can persist after unbind, weakening authorization and isolation guarantees around reply-to routing.
Why this happens
The underlying bug is an authorization logic flaw where routing and deletion checks are out of sync for special reply-to destinations.
RabbitMQ's handling of volatile direct-reply-to queues allows them to be bound and used in routing, but the Khepri-backed deletion path does not fully clean up corresponding route entries when queues are unbound or removed.
This mismatch maps to CWE-863: Improper Authorization, in which the system fails to correctly enforce access control decisions for a particular resource type, allowing foreign or unintended bindings to remain active and be used beyond their expected lifetime.
Potential impact
- Messages may be routed to unexpected consumers, enabling unauthorized receipt of data.
- Attackers could inject messages into reply-to flows, potentially confusing or manipulating RPC-style clients.
- Cross-tenant or cross-service isolation in messaging patterns could be weakened.
- Misrouted replies can lead to information disclosure or integrity issues in higher-level application protocols built on RabbitMQ.
General mitigation guidance
Mitigation generally focuses on tightening routing authorization and treating special destinations like amq.rabbitmq.reply-to as sensitive resources with stricter controls.
Recommended patterns include:
- Enforcing explicit authorization checks for reply-to bindings, ensuring only intended queues can bind to these destinations.
- Designing message flows so that reply-to usage is scoped per tenant or service and does not rely on implicit cleanup of dynamic bindings.
- Applying least-privilege principles to RabbitMQ users and vhosts, limiting who can declare, bind, or alter queues/exchanges that interact with reply-to.
- Implementing monitoring and policy around reply-to usage, preferring controlled RPC abstractions over ad-hoc bindings where feasible.
How teams detect issues like this
Detection can focus on identifying anomalous bindings and route entries involving amq.rabbitmq.reply-to destinations:
- Use configuration and management APIs to periodically audit bindings for reply-to exchanges and flag unexpected or foreign queue associations.
- Apply logging and monitoring for queue and exchange bind/unbind operations, correlating them with route persistence to spot stale or unauthorized routes.
- Incorporate authorization-aware tests in CI/CD pipelines that validate reply-to routing behavior, ensuring bindings are removed when queues are unbound or deleted.
- Static or policy-based checks on infrastructure-as-code (e.g., RabbitMQ definitions or provisioning scripts) can help enforce strict reply-to usage patterns and prevent overly broad binding permissions.

