7.5high
RabbitMQ Java client: Unvalidated Class.forName in JSON-RPC ProcedureDescription enables arbitrary class loading
- Severity
- 7.5high CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.32% (higher than 26% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-6g32-pxv4-2wfj
Description
The RabbitMQ Java client library allows Java and JVM-based applications to connect to and interact with RabbitMQ nodes. Prior to 5.33.0, com.rabbitmq.tools.jsonrpc.ProcedureDescription receives a javaReturnType value in an untrusted system.describe response and passes it through JSONUtil.tryFill, setJavaReturnType, and computeReturnTypeAsJavaClass to Class.forName(javaReturnType) with initialization enabled. An attacker able to answer the JsonRpcClient request through a shared broker or network interception can select a class already present in the victim JVM and trigger its static initializer, while JsonRpcClient.java later passes getReturnType output to mapper.parse and may also create type confusion. Successful exploitation can affect confidentiality, integrity, and availability in the client process. This issue is fixed in version 5.33.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| rabbitmq rabbitmq-java-client | < 5.33.0 | CVE List |
| com.rabbitmq:amqp-client (Maven) | before 5.33.0 | GitHub Advisory Database |
All scores
| GitHub_M | 7.5high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:L/SI:L/SA:L |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:L/SI:L/SA:L |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.
What each source says
CVE List
The RabbitMQ Java client library allows Java and JVM-based applications to connect to and interact with RabbitMQ nodes. Prior to 5.33.0, com.rabbitmq.tools.jsonrpc.ProcedureDescription receives a javaReturnType value in an untrusted system.describe response and passes it through JSONUtil.tryFill, setJavaReturnType, and computeReturnTypeAsJavaClass to Class.forName(javaReturnType) with initialization enabled. An attacker able to answer the JsonRpcClient request through a shared broker or network interception can select a class already present in the victim JVM and trigger its static initializer, while JsonRpcClient.java later passes getReturnType output to mapper.parse and may also create type confusion. Successful exploitation can affect confidentiality, integrity, and availability in the client process. This issue is fixed in version 5.33.0.
GitHub Advisory Database
The JSON-RPC tools in com.rabbitmq.tools.jsonrpc perform Class.forName(javaReturnType) with initialize=true on class names received from untrusted AMQP messages, without any validation or allowlist.
Vulnerable code (ProcedureDescription.java:101-127):
When a JsonRpcClient connects, it calls system.describe and receives a service description from the AMQP queue. The response JSON includes javaReturnType fields that are reflectively set via JSONUtil.tryFill(), triggering setJavaReturnType() → computeReturnTypeAsJavaClass() → Class.forName(javaReturnType).
Attack scenario:
- Victim uses
JsonRpcClientto connect to a JSON-RPC service via RabbitMQ - Attacker (co-tenant on shared broker, or MITM) intercepts the
system.describerequest - Attacker responds with crafted
javaReturnTypevalues - Victim's client calls
Class.forName(attackerInput)with defaultinitialize=true - Static initializers of attacker-specified classes execute in victim's JVM
Additionally, the loaded class from getReturnType() is passed to mapper.parse(replyStr, expectedType) at JsonRpcClient.java:168, potentially enabling type-confusion.
Recommended fix: Use Class.forName(javaReturnType, false, classLoader) to prevent static initializer execution, or add an allowlist of permitted return types.
CWE: CWE-470
Reply from reporter (2026-06-29): Thanks for the quick turnaround. Fix looks good. Looking forward to the CVE assignment.
NVD (es)
La biblioteca cliente Java de RabbitMQ permite a las aplicaciones Java y basadas en JVM conectarse e interactuar con nodos RabbitMQ. Antes de la versión 5.33.0, com.rabbitmq.tools.jsonrpc.ProcedureDescription recibe un valor javaReturnType en una respuesta system.describe no confiable y lo pasa a través de JSONUtil.tryFill, setJavaReturnType y computeReturnTypeAsJavaClass a Class.forName(javaReturnType) con la inicialización habilitada. Un atacante capaz de responder a la solicitud de JsonRpcClient a través de un intermediario compartido o una intercepción de red puede seleccionar una clase ya presente en la JVM de la víctima y activar su inicializador estático, mientras que JsonRpcClient.java posteriormente pasa la salida de getReturnType a mapper.parse y también puede crear confusión de tipos. La explotación exitosa puede afectar la confidencialidad, la integridad y la disponibilidad en el proceso del cliente. Este problema está solucionado en la versión 5.33.0.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-63337 changed 2026-08-18 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-6g32-pxv4-2wfj changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-63337 changed 2026-10-22 | Public domain |