Executive brief
The RabbitMQ Java client library's JSON-RPC tools load and initialize arbitrary Java classes based on untrusted class names received from AMQP messages without validation. An attacker with access to the message broker (or intercepting network traffic) can trigger execution of arbitrary code during class initialization, compromising systems using the affected library to communicate with JSON-RPC services.
Technical details
The vulnerability exists in com.rabbitmq.tools.jsonrpc.ProcedureDescription, which processes JSON-RPC service descriptions received via AMQP. When a JsonRpcClient connects and calls system.describe, the response includes javaReturnType fields that are reflectively set without validation. These fields are passed to Class.forName(javaReturnType) with the default initialize=true parameter, causing static initializers of attacker-controlled classes to execute in the victim's JVM. The vulnerability requires the victim to use JsonRpcClient to connect to a compromised or MITM-intercepted JSON-RPC service. Exploitation allows arbitrary code execution through class initialization. The vulnerability is classified as CWE-470 (unsafe reflection). RabbitMQ patched this in version 5.33.0 by disabling class initialization during loading or implementing class allowlisting.
Affected products
- RabbitMQ amqp-client < 5.33.0
Timeline
- 2026-08-18: disclosed: Published to GitHub Advisory Database
- 2026-08-18: patched: Fix released in version 5.33.0
References
- https://api.github.com/users/lucianjohnhouse
- https://github.com/lucianjohnhouse
- https://api.github.com/users/lucianjohnhouse/gists%7B/gist_id%7D
- https://api.github.com/users/lucianjohnhouse/repos
- https://avatars.githubusercontent.com/u/244141656?v=4
- https://api.github.com/users/lucianjohnhouse/events%7B/privacy%7D