Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-63335

CVE-2026-63335: RabbitMQ Java Client Library DoS Flaw

CVE-2026-63335 is a denial of service vulnerability in RabbitMQ Java client library that allows malicious brokers to terminate client connections. This post covers the technical details, affected versions, impact, and mitigation.

Published:

CVE-2026-63335 Overview

CVE-2026-63335 is a denial-of-service vulnerability in the RabbitMQ Java client library, which allows Java and JVM-based applications to connect to RabbitMQ nodes. Versions prior to 5.31.0 fail to validate the size of inbound AMQP body frames against the declared remainingBodyBytes value during command assembly. A malicious or compromised broker peer can send a malformed frame sequence on an open nonzero channel to force the client to throw an unchecked UnsupportedOperationException, terminating frame processing and closing the connection. The issue is categorized under [CWE-20] Improper Input Validation and is fixed in version 5.31.0.

Critical Impact

A malicious broker peer can terminate the client connection and disrupt any work depending on that channel, resulting in denial of service for applications relying on the affected RabbitMQ Java client.

Affected Products

  • RabbitMQ Java client library versions prior to 5.31.0
  • Java and JVM-based applications embedding the vulnerable client
  • Deployments connecting to untrusted or potentially compromised RabbitMQ brokers

Discovery Timeline

  • 2026-08-18 - CVE-2026-63335 published to NVD
  • 2026-08-18 - Last updated in NVD database

Technical Details for CVE-2026-63335

Vulnerability Analysis

The flaw resides in src/main/java/com/rabbitmq/client/impl/CommandAssembler.java, which handles inbound AMQP command assembly. When the client receives a content-bearing method and header, it stores the expected content size in remainingBodyBytes. Subsequent AMQP.FRAME_BODY payloads decrement this counter as they arrive.

The CommandAssembler.consumeBodyFrame method subtracts the peer-controlled payload length before verifying that the payload fits within the declared remaining size. When an attacker-controlled broker sends a body frame larger than remainingBodyBytes, the counter is driven negative. The code then throws a raw UnsupportedOperationException rather than the expected MalformedFrameException, bypassing the client's normal malformed-frame handling path and closing the underlying connection.

Root Cause

The root cause is missing bounds validation before arithmetic on peer-supplied length fields. The order of operations subtracts first and checks later, and the resulting error path throws an unchecked exception type that upstream connection logic does not classify as a protocol error. Any workload using the affected channel loses its connection.

Attack Vector

Exploitation requires the Java client to connect to a malicious or compromised RabbitMQ broker. The attacker sends a crafted content-bearing method plus header declaring a small remainingBodyBytes, followed by an oversized AMQP.FRAME_BODY payload on an open nonzero channel. No client-side interaction is required beyond an active AMQP session.

java
// Security patch in CommandAssembler.java — adds MalformedFrameException handling
import java.util.List;

import com.rabbitmq.client.AMQP;
import com.rabbitmq.client.MalformedFrameException;
import com.rabbitmq.client.UnexpectedFrameError;
import static java.lang.String.format;

Source: GitHub Commit Fix

java
// Security patch in AMQConnection.java — propagates max inbound message body size
this.credentialsRefreshService = params.getCredentialsRefreshService();

this.maxInboundMessageBodySize = params.getMaxInboundMessageBodySize();
this._channel0 = createChannel0();

this._channelManager = null;

Source: GitHub Commit Update

Detection Methods for CVE-2026-63335

Indicators of Compromise

  • Unhandled UnsupportedOperationException stack traces originating from com.rabbitmq.client.impl.CommandAssembler.consumeBodyFrame in application logs.
  • Repeated unexpected disconnects on nonzero AMQP channels shortly after content-bearing method delivery.
  • Client-side connection resets correlated with a specific broker endpoint or network peer.

Detection Strategies

  • Inventory application dependencies for com.rabbitmq:amqp-client at versions below 5.31.0.
  • Instrument client applications to log AMQP frame parsing exceptions and alert on UnsupportedOperationException from RabbitMQ client packages.
  • Monitor broker-to-client traffic for anomalous frame length declarations where AMQP.FRAME_BODY payload size exceeds the preceding content header's body size field.

Monitoring Recommendations

  • Track connection churn metrics per broker to identify targeted DoS patterns.
  • Correlate consumer or publisher availability alerts with RabbitMQ client exception traces.
  • Alert on repeated abrupt closures of long-lived channels used for critical workloads.

How to Mitigate CVE-2026-63335

Immediate Actions Required

  • Upgrade the RabbitMQ Java client library to version 5.31.0 or later in all affected applications.
  • Audit build manifests (pom.xml, build.gradle) and transitive dependency trees for pinned versions below 5.31.0.
  • Restrict Java clients to connect only to trusted, authenticated RabbitMQ brokers over TLS.

Patch Information

The fix is delivered in RabbitMQ Java Client v5.31.0. The relevant commits import MalformedFrameException into CommandAssembler and wire maxInboundMessageBodySize through AMQConnection so oversized bodies are rejected as protocol errors rather than propagating an unchecked exception. Details are documented in GHSA-qx7j-jv8m-fppr, Pull Request #1959, and Pull Request #1960.

Workarounds

  • Configure a conservative maxInboundMessageBodySize on ConnectionFactory to bound accepted body sizes when upgrading is not immediately possible.
  • Isolate Java client hosts on network segments that only permit egress to vetted broker addresses.
  • Implement automatic reconnect logic with backoff to reduce the operational impact of forced disconnects until patching completes.
bash
# Update the RabbitMQ Java client dependency to the patched release
# Maven (pom.xml)
# <dependency>
#   <groupId>com.rabbitmq</groupId>
#   <artifactId>amqp-client</artifactId>
#   <version>5.31.0</version>
# </dependency>

# Gradle
# implementation 'com.rabbitmq:amqp-client:5.31.0'

# Verify resolved version
mvn dependency:tree | grep amqp-client

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.