CVE-2025-66168: Apache activemq Apache ActiveMQ Is Vulnerable To Vulnerability
MODERATECVE-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
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).
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.
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>apache-activemq</artifactId>
<version>5.19.2</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>apache-activemq</artifactId>
<version>6.1.9</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>apache-activemq</artifactId>
<version>6.2.1</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-all</artifactId>
<version>5.19.2</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-all</artifactId>
<version>6.1.9</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-all</artifactId>
<version>6.2.1</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-mqtt</artifactId>
<version>5.19.2</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-mqtt</artifactId>
<version>6.1.9</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-mqtt</artifactId>
<version>6.2.1</version>
</dependency>
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
CVE-2025-66168 Affected Apache activemq Versions
9 component(s)| 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?
Which Apache activemq versions are affected?
What version fixes CVE-2025-66168?
Is apache-activemq affected?
Is activemq-all affected?
What is the CVSS score of CVE-2025-66168?
What CWE is associated with CVE-2025-66168?
How can I check Maven dependencies for CVE-2025-66168?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}