Arbitrary Class Loading in RabbitMQ Java Client via JSON-RPC
The RabbitMQ Java client library is vulnerable to arbitrary class loading and static initializer execution via unvalidated input in the JSON-RPC ProcedureDescription, which can lead to remote code execution.
CVE search metadata
CVE search record: CVE-2026-63337. KEV: no. Product: amqp-client. Brief: Arbitrary Class Loading in RabbitMQ Java Client via JSON-RPC. Brief link: https://feed.craftedsignal.io/briefs/2026-08-rabbitmq-rce/
What's new
- 1. added coverage for amqp-client Aug 18, 20:58 via ghsa
The RabbitMQ Java client (amqp-client), specifically the com.rabbitmq.tools.jsonrpc component, is susceptible to an arbitrary class loading vulnerability tracked as CVE-2026-63337. The vulnerability exists due to the use of Class.forName() on class names provided within the javaReturnType field of JSON-RPC system.describe responses received via AMQP. The client fails to implement an allowlist or validation for these class names, and performs the lookup with the initialize=true flag.
An attacker who can influence the response to a system.describe call, such as through a compromised or malicious broker, can force the client to load arbitrary classes present on the classpath. Because the initialize parameter is set to true, any static initializers defined within those classes are executed immediately upon loading. This flaw facilitates potential remote code execution (RCE) in the context of the victim's application, in addition to potential type-confusion attacks during subsequent data parsing.
Attack Chain
- The victim application initializes a
JsonRpcClientto interact with a JSON-RPC service over a RabbitMQ broker. - The client sends a
system.describerequest via the AMQP queue. - The attacker intercepts the communication or acts as a malicious broker and provides a crafted JSON response.
- The attacker sets the
javaReturnTypefield in the JSON response to a target malicious or sensitive class name present in the application's classpath. - The
JsonRpcClientreceives the response and processes thejavaReturnTypefield viaJSONUtil.fill(). - The
computeReturnTypeAsJavaClass()method is invoked, triggeringClass.forName()with the attacker-supplied class name andinitialize=true. - The JVM loads the specified class and triggers its static initializer block.
- Arbitrary code defined in the static initializer executes within the victim's process, achieving RCE or other local impact.
Impact
The vulnerability allows for arbitrary class loading and static initializer execution, which poses a significant risk of remote code execution for any application utilizing the com.rabbitmq.tools.jsonrpc package. Affected versions include all versions of the RabbitMQ Java client prior to 5.33.0. Successful exploitation requires an attacker to be positioned as a broker or intercepting party between the client and the JSON-RPC endpoint.
Recommendation
Prioritized actions for addressing CVE-2026-63337:
- Upgrade the RabbitMQ Java client (amqp-client) to version 5.33.0 or later immediately to patch the insecure
Class.forNamecalls. - Review applications using
com.rabbitmq.tools.jsonrpcfor exposure to untrusted AMQP brokers. - If immediate patching is not possible, implement an application-side filter to intercept and validate the
javaReturnTypestring against an strict allowlist of expected classes before the library processes the JSON response.
Immediate actions
Upgrade amqp-client to version 5.33.0 across all Java applications.
Mitigations
Patch CVE-2026-63337 by updating dependencies.
CVE-2026-63337