GHSA-6g32-pxv4-2wfj: Maven/com.rabbitmq:amqp-client vulnerability

Published Aug 18, 2026
·
Updated

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: 1. Victim uses JsonRpcClient to connect to a JSON-RPC service via RabbitMQ 2. Attacker (co-tenant on shared broker, or MITM) intercepts the system.describe request 3. Attacker responds with crafted javaReturnType values 4. Victim's client calls Class.forName(attackerInput) with default initialize=true 5. 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 Software

1 affected componentFixes available
maven/com.rabbitmq:amqp-client<5.33.0
5.33.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade maven/com.rabbitmq:amqp-client to a version that resolves this vulnerability.

    Fixed in 5.33.0
  2. Configuration

    Change the Class.forName call used on untrusted javaReturnType values from initialize=true (default) to initialize=false by using Class.forName(javaReturnType, false, classLoader) to prevent static initializer execution.

    Java JSON-RPC tools (com.rabbitmq.tools.jsonrpc) Class.forName(javaReturnType, true/false, classLoader) initialize flag = false
  3. Configuration

    Add an allowlist (validation) of permitted return types for javaReturnType values received from untrusted AMQP messages before calling computeReturnTypeAsJavaClass() / Class.forName(javaReturnType), to prevent attacker-controlled type confusion and class loading.

    Java JSON-RPC tools (com.rabbitmq.tools.jsonrpc) Return type validation / allowlist for javaReturnType = allowlist
  4. Compensating control

    Add an external validation/constraint at the broker/AMQP layer so the victim cannot retrieve attacker-controlled service descriptions for system.describe from the shared broker (e.g., isolate queues/permissions for com.rabbitmq.tools.jsonrpc service discovery so only trusted services can respond).

Event History

Aug 18, 2026
Advisory Published
via GitHub·04:32 PM
Data Sourced
via GitHub·04:32 PM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

Who is realistically exposed?

Clients using JsonRpcClient are exposed when they connect to a JSON-RPC service through RabbitMQ and an attacker can intercept or provide the response to the client's system.describe request. The described attacker positions are a co-tenant on a shared broker or a man-in-the-middle.

2

What does an attacker need to exploit this?

The attacker needs to control or intercept the AMQP response to system.describe and supply crafted javaReturnType values in the returned service description. No validation or allowlist is applied before the client loads the specified class.

3

What happens on a successful exploit?

The vulnerable Class.forName call uses initialize=true, so static initializers in attacker-specified classes execute in the victim JVM when the class is loaded. The resulting class is also used as the expected type when parsing a reply, which can create type-confusion risk.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203