CVE-2026-57220 Overview
CVE-2026-57220 is a resource exhaustion vulnerability in RabbitMQ, an open-source messaging and streaming broker maintained by Broadcom. The RabbitMQ stream listener does not enforce the configured stream frame-size limit while assembling frames during authentication and before Tune negotiation. An unauthenticated remote client can declare oversized frame lengths, causing the broker to allocate excessive memory in rabbit_stream_core. The flaw is tracked under [CWE-770: Allocation of Resources Without Limits or Throttling]. RabbitMQ versions prior to 4.2.6 are affected, and the issue is fixed in version 4.2.6.
Critical Impact
Unauthenticated remote attackers can exhaust broker memory and induce denial of service against RabbitMQ stream endpoints without any credentials or user interaction.
Affected Products
- Broadcom RabbitMQ Server versions prior to 4.2.6
- RabbitMQ deployments with the stream listener enabled
- Any downstream distribution bundling affected RabbitMQ versions
Discovery Timeline
- 2026-07-10 - CVE-2026-57220 published to NVD
- 2026-07-13 - Last updated in NVD database
Technical Details for CVE-2026-57220
Vulnerability Analysis
The vulnerability resides in the RabbitMQ stream protocol listener, implemented in rabbit_stream_core. During the pre-authentication handshake, the listener reads incoming frames and assembles them from the client-declared length field. The configured stream frame-size limit is only applied after the Tune negotiation phase completes. Frames received before Tune negotiation bypass this bound.
An attacker who connects to the stream port can send a frame header advertising an oversized length. The broker then allocates a buffer sized to the attacker-supplied value while waiting for the remaining bytes. Repeated connections or large declared frames drive memory consumption upward until the Erlang VM exhausts available memory. This produces a denial-of-service condition affecting all message brokering operations on the node.
Root Cause
The root cause is missing input validation on the frame length field during the unauthenticated portion of the stream protocol handshake. The frame-size limit configured in stream.frame_max was enforced only for post-Tune traffic. The pre-Tune code path in rabbit_stream_core accepted any 32-bit length value and allocated memory accordingly, without a per-connection or global cap for unauthenticated peers.
Attack Vector
The attack is network-based and requires no authentication, no privileges, and no user interaction. An attacker sends a TCP connection to the RabbitMQ stream listener port, transmits a stream protocol frame header with a large length field, and optionally slows or omits the frame body to keep the buffer resident. The upstream fix introduces a maximum heap size for unauthenticated connections via new exports in rabbit_access_control, and clears the limit only after successful authentication.
// Patch excerpt: deps/rabbit/src/rabbit_access_control.erl
-export([permission_cache_can_expire/1, update_state/2, expiry_timestamp/1]).
+-export([set_max_heap_size_unauthenticated/1,
+ clear_max_heap_size/0]).
// Patch excerpt: deps/rabbit/src/rabbit_amqp_reader.erl
{ok, User} ->
+ rabbit_access_control:clear_max_heap_size(),
Outcome = #'v1_0.sasl_outcome'{code = ?V_1_0_SASL_CODE_OK},
ok = send_on_channel0(State, Outcome, rabbit_amqp_sasl),
Source: RabbitMQ commit 595ec28 and commit 773a49c. The fix caps the heap for unauthenticated connections and lifts the cap once SASL authentication succeeds.
Detection Methods for CVE-2026-57220
Indicators of Compromise
- Rapid, sustained growth of RabbitMQ node memory usage without a corresponding increase in authenticated client sessions or message throughput.
- Erlang VM memory alarms or high_memory_watermark triggers on nodes exposing the stream listener (default TCP port 5552).
- Large volumes of TCP connections to the stream port that terminate before completing SASL authentication and Tune negotiation.
Detection Strategies
- Monitor rabbit_stream_core process memory and the Erlang scheduler queue length for anomalies against baseline.
- Correlate connection open events on the stream listener with authentication success events to identify connections that stall pre-Tune.
- Alert when rabbitmqctl status or the management API reports memory approaching the high-watermark under low published-message rates.
Monitoring Recommendations
- Ingest RabbitMQ metrics through Prometheus or the management plugin and set thresholds on erlang_vm_memory_bytes_total and per-connection memory.
- Track network flow data for the stream listener port and flag source addresses with high connection-open rates and no completed SASL handshakes.
- Enable audit logging of failed and incomplete authentications, and alert on repeated attempts from the same source.
How to Mitigate CVE-2026-57220
Immediate Actions Required
- Upgrade all RabbitMQ nodes to version 4.2.6 or later, which contains the fixes from pull requests #16171 and #16173.
- Restrict network access to the stream listener port (default 5552) to trusted client networks using firewall rules or security groups.
- Review broker memory watermarks and ensure alerts are configured before host memory is exhausted.
Patch Information
The vulnerability is fixed in RabbitMQ 4.2.6. See the RabbitMQ v4.2.6 release notes and the GitHub Security Advisory GHSA-f364-87q5-j35q. The patch introduces set_max_heap_size_unauthenticated/1 and clear_max_heap_size/0 in rabbit_access_control, capping heap allocation for connections until SASL authentication completes.
Workarounds
- Disable the stream plugin with rabbitmq-plugins disable rabbitmq_stream on nodes where the stream protocol is not required.
- Place the stream listener behind a network proxy or mTLS-terminating load balancer that enforces connection rate limits and body size caps.
- Lower the configured stream.frame_max and reduce the high_memory_watermark to shorten the exposure window until patching is complete.
# Verify RabbitMQ version and disable the stream plugin if unused
rabbitmqctl version
rabbitmq-plugins list -e | grep rabbitmq_stream
rabbitmq-plugins disable rabbitmq_stream
# Restrict access to the stream listener port (Linux example)
iptables -A INPUT -p tcp --dport 5552 -s 10.0.0.0/8 -j ACCEPT
iptables -A INPUT -p tcp --dport 5552 -j DROP
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

