Vulnerability GHSA-cqgh-8p3p-mx4m

Medium Risk
MEDIUM RISK
CVSS Score: 4.9
Score Range: 4.0–6.9
Medium severity vulnerabilities (CVSS 4.0–6.9). Important issues that meaningfully reduce security confidence.
7 hours ago
October 07, 2026 at 08:42 PM UTC
RabbitMQ: JSONReader in the default JSON-RPC mapper never terminates on truncated input, causing DoS
1.3.0 and 1.5.4 - 1.6.0 and 1.7.2 - 2.3.1 and 2.4.1 - 2.7.1 and 4.1.0 - 4.1.1 and 4.3.0 and 4.5.0 - 4.7.0 and 4.10.0 and 4.12.0 - 5.0.0 and 5.2.0 - 5.3.0 and 5.6.0 and 5.8.0 - 5.13.1 and 5.15.0 - 5.36.0
1.3.0 and 1.5.4 - 1.6.0 and 1.7.2 - 2.3.1 and 2.4.1 - 2.7.1 and 4.1.0 - 4.1.1 and 4.3.0 and 4.5.0 - 4.7.0 and 4.10.0 and 4.12.0 - 5.0.0 and 5.2.0 - 5.3.0 and 5.6.0 and 5.8.0 - 5.13.1 and 5.15.0 - 5.36.0

Summary

RabbitMQ: JSONReader in the default JSON-RPC mapper never terminates on truncated input, causing DoS

Details

Summary

com.rabbitmq.tools.json.JSONReader.read() never returns when its input ends inside a quoted string or a // line comment. Both scanners walk the input with StringCharacterIterator.next() but only compare against a delimiter, so once the iterator reaches CharacterIterator.DONE (￿) they loop forever. The string scanner (string(), line 210, while (c != sep)) also appends ￿ to a StringBuilder every iteration, so it fills the heap and throws OutOfMemoryError, taking down the JVM. The comment scanner (skipWhiteSpace(), lines 89-92, while (c != '\n')) pins a thread at 100% CPU with no allocation.

This is reachable with a single message. JsonRpcServer and JsonRpcClient fall back to DefaultJsonRpcMapper whenever no mapper is passed (JsonRpcServer.java:84 and :114, JsonRpcClient.java:186), and that mapper hands the raw message body straight to JSONReader.read() (DefaultJsonRpcMapper.java:42 for the server request, :52 for the client reply). A caller that can publish to the RPC request queue hangs the server; a malicious or MITM'd JSON-RPC service does the same to a client.

Proof of concept

Against amqp-client 5.36.0 from Maven Central:

import com.rabbitmq.tools.jsonrpc.DefaultJsonRpcMapper;

public class Poc {
    public static void main(String[] args) {
        DefaultJsonRpcMapper mapper = new DefaultJsonRpcMapper();
        mapper.parse("{\"method\":\"x", String.class); // unterminated string
        // mapper.parse("//", String.class);           // unterminated // comment
        System.out.println("unreachable");
    }
}

java -Xmx64m -cp amqp-client-5.36.0.jar:. Poc throws OutOfMemoryError: Java heap space in about 0.1s and never prints. Swapping in the // line spins at 100% CPU and never returns. A well-formed body such as {"method":"x"} returns immediately.

Impact

Availability. One small, unauthenticated message stops a JSON-RPC endpoint: the unterminated string exhausts the heap, the unterminated comment pins a thread forever. Neither is recoverable per request - JsonRpcServer.doCall only catches ClassCastException, and an OutOfMemoryError affects the whole process.

Scope and fix

Only applications using the JSON-RPC-over-AMQP tooling (com.rabbitmq.tools.jsonrpc) with the default DefaultJsonRpcMapper are affected. DefaultJsonRpcMapper and JSONReader are deprecated in favour of JacksonJsonRpcMapper, but both still ship and remain the default when no mapper is supplied. The fix is to stop both loops at CharacterIterator.DONE.

Related Vulnerabilities

Other vulnerabilities affecting the same packages

Medium Risk
7 hours ago
RabbitMQ: Malformed UTF-8 in shortstr properties permanently disables RPC consumers
1.3.0 and 1.5.4 - 1.6.0 and 1.7.2 - 2.3.1 and 2.4.1 - 2.7.1 and 4.1.0 - 4.1.1 and 4.3.0 and 4.5.0 - 4.7.0 and 4.10.0 and 4.12.0 - 5.0.0 and 5.2.0 - 5.3.0 and 5.6.0 and 5.8.0 - 5.13.1 and 5.15.0 - 5.35.0 GHSA-7822-rcf6-97fx
1.3.0 and 1.5.4 - 1.6.0 and 1.7.2 - 2.3.1 and 2.4.1 - 2.7.1 and 4.1.0 - 4.1.1 and 4.3.0 and 4.5.0 - 4.7.0 and 4.10.0 and 4.12.0 - 5.0.0 and 5.2.0 - 5.3.0 and 5.6.0 and 5.8.0 - 5.13.1 and 5.15.0 - 5.35.0 GHSA-7822-rcf6-97fx
Medium Risk
11 hours ago
RabbitMQ Java client: plaintext broker credentials leaked in exception message from ConnectionFactoryConfigurator.load()
1.3.0 and 1.5.4 - 1.6.0 and 1.7.2 - 2.3.1 and 2.4.1 - 2.7.1 and 4.1.0 - 4.1.1 and 4.3.0 and 4.5.0 - 4.7.0 and 4.10.0 and 4.12.0 - 5.0.0 and 5.2.0 - 5.3.0 and 5.6.0 and 5.8.0 - 5.13.1 and 5.15.0 - 5.34.0 GHSA-h6w7-qmcm-q6xr
1.3.0 and 1.5.4 - 1.6.0 and 1.7.2 - 2.3.1 and 2.4.1 - 2.7.1 and 4.1.0 - 4.1.1 and 4.3.0 and 4.5.0 - 4.7.0 and 4.10.0 and 4.12.0 - 5.0.0 and 5.2.0 - 5.3.0 and 5.6.0 and 5.8.0 - 5.13.1 and 5.15.0 - 5.34.0 GHSA-h6w7-qmcm-q6xr
High Risk
20 days ago
RabbitMQ Java client has frame-level OOM: Math.min(maxInboundMessageBodySize, 0) defeats frame size enforcement
1.3.0 and 1.5.4 - 1.6.0 and 1.7.2 - 2.3.1 and 2.4.1 - 2.7.1 and 4.1.0 - 4.1.1 and 4.3.0 and 4.5.0 - 4.7.0 and 4.10.0 and 4.12.0 - 5.0.0 and 5.2.0 - 5.3.0 and 5.6.0 and 5.8.0 - 5.13.1 and 5.15.0 - 5.33.1 GHSA-jh4v-gfqj-7rhx
1.3.0 and 1.5.4 - 1.6.0 and 1.7.2 - 2.3.1 and 2.4.1 - 2.7.1 and 4.1.0 - 4.1.1 and 4.3.0 and 4.5.0 - 4.7.0 and 4.10.0 and 4.12.0 - 5.0.0 and 5.2.0 - 5.3.0 and 5.6.0 and 5.8.0 - 5.13.1 and 5.15.0 - 5.33.1 GHSA-jh4v-gfqj-7rhx
Low Risk
1 month ago
RabbitMQ Java client accepts broker frames larger than the negotiated AMQP frame_max
1.3.0 and 1.5.4 - 1.6.0 and 1.7.2 - 2.3.1 and 2.4.1 - 2.7.1 and 4.1.0 - 4.1.1 and 4.3.0 and 4.5.0 - 4.7.0 and 4.10.0 and 4.12.0 - 5.0.0 and 5.2.0 - 5.3.0 and 5.6.0 and 5.8.0 - 5.13.1 and 5.15.0 - 5.32.0 GHSA-5xwg-cfvj-gff5
1.3.0 and 1.5.4 - 1.6.0 and 1.7.2 - 2.3.1 and 2.4.1 - 2.7.1 and 4.1.0 - 4.1.1 and 4.3.0 and 4.5.0 - 4.7.0 and 4.10.0 and 4.12.0 - 5.0.0 and 5.2.0 - 5.3.0 and 5.6.0 and 5.8.0 - 5.13.1 and 5.15.0 - 5.32.0 GHSA-5xwg-cfvj-gff5
Medium Risk
1 month ago
RabbitMQ Java client: TrustEverythingTrustManager used by default in useSslProtocol() enables MITM
1.3.0 and 1.5.4 - 1.6.0 and 1.7.2 - 2.3.1 and 2.4.1 - 2.7.1 and 4.1.0 - 4.1.1 and 4.3.0 and 4.5.0 - 4.7.0 and 4.10.0 and 4.12.0 - 5.0.0 and 5.2.0 - 5.3.0 and 5.6.0 and 5.8.0 - 5.13.1 and 5.15.0 - 5.32.0 GHSA-5m9f-rphj-c435
1.3.0 and 1.5.4 - 1.6.0 and 1.7.2 - 2.3.1 and 2.4.1 - 2.7.1 and 4.1.0 - 4.1.1 and 4.3.0 and 4.5.0 - 4.7.0 and 4.10.0 and 4.12.0 - 5.0.0 and 5.2.0 - 5.3.0 and 5.6.0 and 5.8.0 - 5.13.1 and 5.15.0 - 5.32.0 GHSA-5m9f-rphj-c435
View all vulnerabilities for these packages

Impacted packages

Timeline

Published
7 hours ago
October 07, 2026 at 08:42 PM UTC
Last Modified
7 hours ago
October 07, 2026 at 09:00 PM UTC