An amplification memory-exhaustion denial of service exists in RabbitMQ's AMQP 1.0 type parser. Any client that can complete a SASL handshake (by default guest/guest; any valid low-privilege user in a real deployment — with only vhosts access permissions required) can send a single ~30–128 KB frame that the parser expands into multiple gigabytes of heap. A cap limits the size of any one "zero-width" array to 10,000 elements, but there is no aggregate limit on how many such arrays a single frame may contain. The frame is parsed in the connection reader process BEFORE any validation or authorization, and the reader's max_heap_size kill-guard is cleared immediately after authentication — so nothing bounds the allocation. A few tens of KB of traffic trips the node-wide memory alarm (blocking all publishers on the node) and, with a few concurrent frames (~180 KB total), OOM-kills the entire broker. Measured amplification: ~50,000× (30 KB in → ~2.4 GB heap).
Root cause — deps/amqp10_common/src/amqp10_binary_parser.erl:
Where it detonates (before any validation) — deps/rabbit/src/rabbit_amqp_reader.erl:
handle_frame0(Mode, Channel, Body, State) ->
Performative = parse_frame_body(Body, Channel), % line 409 — parse FIRST
... % classification/routing AFTER
parse_frame_body(Body, _Channel) ->
{DescribedPerformative, BytesParsed} =
amqp10_binary_parser:parse(Body), % line 419 — allocation happens here
...
The parse (and its allocation) runs for every frame body in the reader process; any later rejection by amqp10_framing:decode happens only after the memory has already been consumed.
Why the reader guard does not help post-auth — deps/rabbit/src/rabbit_amqp_reader.erl:
{ok, User} ->
rabbit_access_control:clear_max_heap_size(), % line 792 — kill-guard REMOVED
Pre-auth, max_heap_size = 16 MiB (kill=true) limits damage to a single-connection kill. On SASL success the guard is cleared, so nothing bounds the reader process heap thereafter.
Frame-size window: post-open, incoming_max_frame_size = frame_max = 131072 (128 KB), giving ~13,100 arrays/frame ⇒ ~2 GB/frame.
docker run -d --name rmq-poc --memory=4g \
-p 5672:5672 -p 15672:15672 rabbitmq:4-management # => RabbitMQ 4.3.2, OTP 27
Attack: a raw-socket AMQP 1.0 client (Python stdlib only, attached as amqp10_bomb.py) that
(1) does SASL PLAIN as guest, (2) sends open, (3) sends one frame containing an outer list32 of N zero-width null arrays — each f0 00000005 00002710 40 (array32, count=10000, elem=null).
# amplification demo — single frame, node survives:
# crash / node-wide alarm — 3 concurrent 128 KB frames (~180 KB total):
python3 amqp10_bomb.py 13000 3 127.0.0.1 5672 <user> <password>
Measure broker memory in a separate window:
docker stats rmq-poc
Type: CWE-770 / CWE-400 — Denial of Service (uncontrolled memory allocation).
Any RabbitMQ deployment with the AMQP 1.0 listener enabled (default on 5672 in 4.x) reachable by any authenticated principal — i.e. effectively all network-exposed brokers.