CVE-2026-63337
RabbitMQ Java client: Unvalidated Class.forName in JSON-RPC ProcedureDescription enables arbitrary class loading
Description
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.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| com.rabbitmq » amqp-client | < 5.33.0 | 5.33.0 |
Blast radius
72% of the dependent artifacts (5,652) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 22,148 |
| 2 hops | 75,867 |
| 3 hops | 115,218 |
| 4 hops | 65,893 |
| 5 hops | 29,945 |
| 6 hops | 15,538 |
Most used dependents
- org.apache.spark » spark-sql3,174 usages
- org.apache.spark » spark-core2,899 usages
- org.apache.spark » spark-mllib831 usages
- org.apache.hive » hive-exec699 usages
- org.springframework.boot » spring-boot-starter-amqp691 usages
- org.apache.spark » spark-streaming670 usages
- org.apache.spark » spark-hive633 usages
- org.apache.camel.springboot » camel-core-starter558 usages
- org.nuxeo.ecm.core » nuxeo-core-api534 usages
- org.apache.spark » spark-catalyst502 usages
- org.apache.solr » solr-core500 usages
- org.apache.hive » hive-metastore480 usages
- org.apache.camel.springboot » camel-spring-boot-starter478 usages
- org.apache.synapse » synapse-core453 usages
- org.springframework.amqp » spring-rabbit405 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
- Webhttps://github.com/rabbitmq/rabbitmq-java-client/security/advisories/GHSA-6g32-pxv4-2wfj
- Webhttps://github.com/rabbitmq/rabbitmq-java-client/pull/2000
- Webhttps://github.com/rabbitmq/rabbitmq-java-client/pull/2002
- Webhttps://github.com/rabbitmq/rabbitmq-java-client/commit/0032f75f9dc3df847f94b2b85a16119250bf63cb
- Webhttps://github.com/rabbitmq/rabbitmq-java-client/commit/9f8e7efd0c648f235dc0e96232ae7efa75ea4fa8
- Packagehttps://github.com/rabbitmq/rabbitmq-java-client
- Webhttps://github.com/rabbitmq/rabbitmq-java-client/releases/tag/v5.33.0
