Dead Letter Exchange Bypasses Topic-Level Authorization (not Resource-Level)
Summary
Summary
queue.declare checks only resource-level write permission on x-dead-letter-exchange. It does not check x-dead-letter-routing-key against the declaring user's topic permissions. rabbit_dead_letter:publish/5 then routes the dead-lettered message with broker authority and perfo...
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| otherrabbitmq-server |
>= 4.4.0, < 4.4.1→ 4.4.1 |
4.4.1 |
| otherrabbitmq-server |
>= 4.3.0, < 4.3.8→ 4.3.8 |
4.3.8 |
| otherrabbitmq-server |
>= 4.2.0, < 4.2.13→ 4.2.13 |
4.2.13 |
| otherrabbitmq-server |
>= 4.1.0, < 4.1.18→ 4.1.18 |
4.1.18 |
| otherrabbitmq-server |
>= 3.13.0, < 3.13.22→ 3.13.22 |
3.13.22 |
Original description The description as published by the source.
Summary
queue.declare checks only resource-level write permission on x-dead-letter-exchange. It does not check x-dead-letter-routing-key against the declaring user's topic permissions. rabbit_dead_letter:publish/5 then routes the dead-lettered message with broker authority and performs no authorization check.
An authenticated user whose topic write pattern is ^public\..*$ can declare a queue with x-dead-letter-exchange=amq.topic, x-dead-letter-routing-key=admin.secret, and x-message-ttl=0. A message published to that queue expires immediately and is delivered on amq.topic with routing key admin.secret. A direct basic.publish of that key returns 403 ACCESS_REFUSED.
Affected versions are >= 3.7.0, <= 4.4.0, plus current main (d38028c9c3). Retested on 2026-10-31 with the official rabbitmq:4.4.0-management image (rabbitmqctl version reported 4.4.0). No management tag is required.
Details
Topic permissions, added in 3.7.0, are the routing-key authorization layer on a topic exchange. Publishing goes through both the resource write check and check_topic_authorisation/5. Dead lettering does not.
On v4.4.0, deps/rabbit/src/rabbit_channel.erl:2593 handles x-dead-letter-exchange by calling check_read_permitted/3 on the queue and check_write_permitted/3 on the DLX exchange. It never calls check_topic_authorisation/5 for x-dead-letter-routing-key. On main (d38028c9c3) the same branch is at `deps/rabbit/src/rabbit_ch…
Source: GitHub Repository Security Advisories (Game のスタック) GitHub Advisory OSV
References
- GITHUB_REPO_ADVISORY rabbitmq/rabbitmq-server