CVE-2025-66168: Apache activemq Apache ActiveMQ Is Vulnerable To Vulnerability

MODERATE
Advisory Identifier: GHSA-c825-6ph3-4h84
CVSS 5.4
CWE-190
Published
Advisory Summary

CVE-2025-66168 is a MODERATE (CVSS 5.4) apache activemq is vulnerable to vulnerability (CWE-190: Integer Overflow or Wraparound) affecting Apache activemq libraries in the Maven ecosystem. The issue involves apache activemq is vulnerable to integer overflow or wraparound. Remediation is available by upgrading affected packages to version 5.19.2, 6.1.9, 6.2.1.

CVE-2025-66168 at a Glance

CVE Identifier CVE-2025-66168
GHSA Identifier GHSA-c825-6ph3-4h84
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification CWE-190: Integer Overflow or Wraparound
Affected Product Apache activemq
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 5.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2025-66168

To remediate this vulnerability, upgrade all affected Apache activemq dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.apache.activemq:apache-activemq fixed: 5.19.2
<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>apache-activemq</artifactId>
    <version>5.19.2</version>
</dependency>
org.apache.activemq:apache-activemq fixed: 6.1.9
<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>apache-activemq</artifactId>
    <version>6.1.9</version>
</dependency>
org.apache.activemq:apache-activemq fixed: 6.2.1
<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>apache-activemq</artifactId>
    <version>6.2.1</version>
</dependency>
org.apache.activemq:activemq-all fixed: 5.19.2
<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>activemq-all</artifactId>
    <version>5.19.2</version>
</dependency>
org.apache.activemq:activemq-all fixed: 6.1.9
<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>activemq-all</artifactId>
    <version>6.1.9</version>
</dependency>
org.apache.activemq:activemq-all fixed: 6.2.1
<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>activemq-all</artifactId>
    <version>6.2.1</version>
</dependency>
org.apache.activemq:activemq-mqtt fixed: 5.19.2
<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>activemq-mqtt</artifactId>
    <version>5.19.2</version>
</dependency>
org.apache.activemq:activemq-mqtt fixed: 6.1.9
<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>activemq-mqtt</artifactId>
    <version>6.1.9</version>
</dependency>
org.apache.activemq:activemq-mqtt fixed: 6.2.1
<dependency>
    <groupId>org.apache.activemq</groupId>
    <artifactId>activemq-mqtt</artifactId>
    <version>6.2.1</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.apache.activemq

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2025-66168, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.apache.activemq

Analyze the terminal output to locate any version of Apache activemq in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.19.2), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.apache.activemq command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-190: Integer Overflow or Wraparound, where the product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. this occurs when an integer value is incremented to a value that is too large to store in the associated representation. when this occurs, the value may become a very small or negative number. In Apache activemq, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Apache ActiveMQ does not properly validate the remaining length field which may lead to an overflow during the decoding of malformed packets. When this integer overflow occurs, ActiveMQ may incorrectly compute the total Remaining Length and subsequently misinterpret the payload as multiple MQTT control packets which makes the broker susceptible to unexpected behavior when interacting with non-compliant clients. This behavior violates the MQTT v3.1.1 specification, which restricts Remaining Length to a maximum of 4 bytes. The scenario occurs on established connections after the authentication process. Brokers that are not enabling mqtt transport connectors are not impacted. This issue affects Apache ActiveMQ: before 5.19.2, 6.0.0 to 6.1.8, and 6.2.0 Users are recommended to upgrade to version 5.19.2, 6.1.9, or 6.2.1, which fixes the issue.

CVE-2025-66168 Affected Apache activemq Versions

9 component(s)
Fixed Versions:
5.19.26.1.96.2.1
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.activemq:apache-activemq
Maven
< 5.19.2
5.19.2
org.apache.activemq:apache-activemq
Maven
≥ 6.0.0
< 6.1.9
6.1.9
org.apache.activemq:apache-activemq
Maven
≥ 6.2.0
< 6.2.1
All 1 versions
6.2.0
6.2.1
org.apache.activemq:activemq-all
Maven
< 5.19.2
5.19.2
org.apache.activemq:activemq-all
Maven
≥ 6.0.0
< 6.1.9
6.1.9
org.apache.activemq:activemq-all
Maven
≥ 6.2.0
< 6.2.1
All 1 versions
6.2.0
6.2.1
org.apache.activemq:activemq-mqtt
Maven
< 5.19.2
5.19.2
org.apache.activemq:activemq-mqtt
Maven
≥ 6.0.0
< 6.1.9
6.1.9
org.apache.activemq:activemq-mqtt
Maven
≥ 6.2.0
< 6.2.1
All 1 versions
6.2.0
6.2.1

References

Frequently Asked Questions

What is CVE-2025-66168?
CVE-2025-66168 is a security vulnerability in Apache activemq involving Apache ActiveMQ is Vulnerable to Integer Overflow or Wraparound under CWE-190: Integer Overflow or Wraparound.
Which Apache activemq versions are affected?
Affected versions include releases prior to 5.19.2, 6.1.9, 6.2.1 across affected packages: org.apache.activemq:apache-activemq, org.apache.activemq:activemq-all, org.apache.activemq:activemq-mqtt.
What version fixes CVE-2025-66168?
Upgrading to 5.19.2, 6.1.9, 6.2.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is apache-activemq affected?
Yes, org.apache.activemq:apache-activemq is affected in releases prior to 5.19.2, 6.1.9, 6.2.1. Upgrade your dependency to 5.19.2, 6.1.9, 6.2.1 or later.
Is activemq-all affected?
Yes, org.apache.activemq:activemq-all is affected in releases prior to 5.19.2, 6.1.9, 6.2.1. Upgrade your dependency to 5.19.2, 6.1.9, 6.2.1 or later.
What is the CVSS score of CVE-2025-66168?
CVE-2025-66168 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2025-66168?
CVE-2025-66168 is classified under CWE-190: Integer Overflow or Wraparound (The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.).
How can I check Maven dependencies for CVE-2025-66168?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.activemq'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-c825-6ph3-4h84",
  "modified" : "2026-04-10T14:59:47Z",
  "published" : "2026-03-04T09:31:07Z",
  "aliases" : [ "CVE-2025-66168" ],
  "summary" : "Apache ActiveMQ is Vulnerable to Integer Overflow or Wraparound",
  "details" : "Apache ActiveMQ does not properly validate the remaining length field which may lead to an overflow during the decoding of malformed packets. When this integer overflow occurs, ActiveMQ may incorrectly compute the total Remaining Length and subsequently misinterpret the payload as multiple MQTT control packets which makes the broker susceptible to unexpected behavior when interacting with non-compliant clients. This behavior violates the MQTT v3.1.1 specification, which restricts Remaining Length to a maximum of 4 bytes. The scenario occurs on established connections after the authentication process. Brokers that are not enabling mqtt transport connectors are not impacted.\n\nThis issue affects Apache ActiveMQ: before 5.19.2, 6.0.0 to 6.1.8, and 6.2.0\n\nUsers are recommended to upgrade to version 5.19.2, 6.1.9, or 6.2.1, which fixes the issue.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.activemq:apache-activemq"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.19.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.activemq:apache-activemq"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "6.1.9"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.activemq:apache-activemq"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.2.0"
      }, {
        "fixed" : "6.2.1"
      } ]
    } ],
    "versions" : [ "6.2.0" ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.activemq:activemq-all"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.19.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.activemq:activemq-all"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "6.1.9"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.activemq:activemq-all"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.2.0"
      }, {
        "fixed" : "6.2.1"
      } ]
    } ],
    "versions" : [ "6.2.0" ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.activemq:activemq-mqtt"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.19.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.activemq:activemq-mqtt"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "6.1.9"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.activemq:activemq-mqtt"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.2.0"
      }, {
        "fixed" : "6.2.1"
      } ]
    } ],
    "versions" : [ "6.2.0" ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-66168"
  }, {
    "type" : "WEB",
    "url" : "https://activemq.apache.org/security-advisories.data/CVE-2026-40046-announcement.txt"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/activemq"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/13n8mkrb2jf2y6yyhpgrkmpqcm7djyto"
  }, {
    "type" : "WEB",
    "url" : "https://www.cve.org/CVERecord?id=CVE-2026-40046"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2026/03/03/5"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-190" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-04T22:19:25Z",
    "nvd_published_at" : "2026-03-04T09:15:54Z"
  }
}