CVE-2026-136252

Discovered by AISLEPUBLISHED

Description

## Summary RabbitMQ accepts the MQTT 5 `Receive Maximum` CONNECT property with value zero, although MQTT 5 requires the server to treat zero as a malformed packet. RabbitMQ converts the value directly into `{simple_prefetch, 0}`. For classic queues, zero means **unlimited prefetch**, not zero delivery credit. An authenticated subscriber can therefore advertise zero, subscribe at QoS 1, read deliveries without sending PUBACK, and cause the broker's MQTT process and queue acknowledgement state to grow without the configured MQTT prefetch bound. A control connection advertising `Receive Maximum = 1` receives exactly one QoS 1 message until it acknowledges it. ## Preconditions - `rabbitmq_mqtt` or Web MQTT is enabled. - The attacker has valid credentials and permission to consume a topic. - Messages are available to the subscription at QoS 1. - The affected subscription uses a classic queue. Clean-start MQTT subscriptions use classic queues in the verified configuration. ## Root cause ### 1. CONNECT parsing accepts zero ```erlang %% deps/rabbitmq_mqtt/src/rabbit_mqtt_packet.erl:350-351 parse_prop(<<16#21, Val:16, Bin/binary>>, ?CONNECT = Type, Props) -> parse_prop(Bin, Type, Props#{'Receive-Maximum' => Val}); ``` No guard rejects `Val = 0`. ### 2. Zero becomes effective prefetch ```erlang %% deps/rabbitmq_mqtt/src/rabbit_mqtt_processor.erl:295-302 prefetch(Props) -> ReceiveMax = maps:get('Receive-Maximum', Props, ?TWO_BYTE_INTEGER_MAX), min(rabbit_mqtt_util:env(prefetch), ReceiveMax). ``` With `mqtt.prefetch = 10`, a client value of zero produces zero. ### 3. Classic queues interpret zero as unlimited The MQTT consumer is created with: ```erlang mode => {simple_prefetch, Prefetch} ``` At `Prefetch = 0`, `rabbit_queue_consumers` does not install a limiting credit record. QoS 1 deliveries continue while the MQTT processor tracks packet IDs and waits for PUBACK. Quorum queues treat zero differently and can stop delivery, but this does not protect classic MQTT subscription queues. ## Basic Python proof of concept Attachment: `mqtt-receive-maximum-zero-poc.py` The attachment is one Python 3 file using only the standard library. Target configuration: ```ini # rabbitmq.conf mqtt.prefetch = 10 ``` Enable MQTT and create any ordinary user with permission to consume and publish in the target vhost: ```bash rabbitmq-plugins enable rabbitmq_mqtt ``` Run the PoC against that server: ```bash python3 mqtt-receive-maximum-zero-poc.py \ --host rabbitmq.example --port 1883 \ --user poc --password pocpass \ --messages 1000 ``` The script connects two raw MQTT 5 subscribers: - control: `Receive Maximum = 1`; - attack: forbidden `Receive Maximum = 0`. Both subscribe at QoS 1 and deliberately send no PUBACK. A third connection publishes 20 control messages and 1,000 attack messages. A vulnerable server prints: ```text { "receive_maximum_1_deliveries_without_puback": 1, "receive_maximum_0_deliveries_without_puback": 1000, "attack_messages_published": 1000 } VULNERABLE ``` ### Independent Docker validation evidence The same wire sequence was independently run against stock RabbitMQ 4.3.4: ```text RabbitMQ 4.3.4 control: Receive Maximum: 1 published QoS 1: 20 received without PUBACK: 1 attack: Receive Maximum: 0 published QoS 1: 1000 received without PUBACK: 1000 PASS: Receive Maximum zero exceeded configured broker prefetch PASS: Receive Maximum zero delivered at least 90% without PUBACK ASSERTIONS_OK Ping succeeded ``` MQTT QoS acknowledgements are tracked inside `rabbit_mqtt_processor`, so management queue `messages_unacknowledged` can remain zero even while the MQTT client has 1,000 QoS 1 deliveries awaiting PUBACK. The wire-level control directly demonstrates the credit bypass. ## Impact - The attacker can make unsettled delivery state grow far beyond both the client-advertised receive limit and the configured broker MQTT prefetch.

CVSS Base Scores

CVSS v4.02.3

CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Affected Products

VendorProductVersionStatus
RabbitMQ——

References