CVE-2025-66168

CVE-2025-66168 is a medium-severity integer overflow or wraparound vulnerability in org.apache.activemq:apache-activemq (maven), affecting versions < 5.19.2. It is fixed in 5.19.2, 6.1.9, 6.2.1.

Summary

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.

Impact

An arithmetic operation produces a value that exceeds the integer type's maximum, causing it to wrap to an unexpected small value. Typical impact: incorrect size calculations leading to heap overflows or logic errors.

CVE-2025-66168 has a CVSS score of 5.4 (Medium). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (5.19.2, 6.1.9, 6.2.1); upgrading removes the vulnerable code path.

Affected versions

org.apache.activemq:apache-activemq (< 5.19.2) org.apache.activemq:apache-activemq (>= 6.0.0, < 6.1.9) org.apache.activemq:apache-activemq (= 6.2.0) org.apache.activemq:activemq-all (< 5.19.2) org.apache.activemq:activemq-all (>= 6.0.0, < 6.1.9) org.apache.activemq:activemq-all (= 6.2.0) org.apache.activemq:activemq-mqtt (< 5.19.2) org.apache.activemq:activemq-mqtt (>= 6.0.0, < 6.1.9) org.apache.activemq:activemq-mqtt (= 6.2.0)

Security releases

org.apache.activemq:apache-activemq → 5.19.2 (maven) org.apache.activemq:apache-activemq → 6.1.9 (maven) org.apache.activemq:apache-activemq → 6.2.1 (maven) org.apache.activemq:activemq-all → 5.19.2 (maven) org.apache.activemq:activemq-all → 6.1.9 (maven) org.apache.activemq:activemq-all → 6.2.1 (maven) org.apache.activemq:activemq-mqtt → 5.19.2 (maven) org.apache.activemq:activemq-mqtt → 6.1.9 (maven) org.apache.activemq:activemq-mqtt → 6.2.1 (maven)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade the following packages to resolve this vulnerability:

org.apache.activemq:apache-activemq to 5.19.2 or later; org.apache.activemq:apache-activemq to 6.1.9 or later; org.apache.activemq:apache-activemq to 6.2.1 or later; org.apache.activemq:activemq-all to 5.19.2 or later; org.apache.activemq:activemq-all to 6.1.9 or later; org.apache.activemq:activemq-all to 6.2.1 or later; org.apache.activemq:activemq-mqtt to 5.19.2 or later; org.apache.activemq:activemq-mqtt to 6.1.9 or later; org.apache.activemq:activemq-mqtt to 6.2.1 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2025-66168? CVE-2025-66168 is a medium-severity integer overflow or wraparound vulnerability in org.apache.activemq:apache-activemq (maven), affecting versions < 5.19.2. It is fixed in 5.19.2, 6.1.9, 6.2.1. An arithmetic operation produces a value that exceeds the integer type's maximum, causing it to wrap to an unexpected small value.
  2. How severe is CVE-2025-66168? CVE-2025-66168 has a CVSS score of 5.4 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2025-66168?
    • org.apache.activemq:apache-activemq (maven) (versions < 5.19.2)
    • org.apache.activemq:activemq-all (maven) (versions < 5.19.2)
    • org.apache.activemq:activemq-mqtt (maven) (versions < 5.19.2)
  4. Is there a fix for CVE-2025-66168? Yes. CVE-2025-66168 is fixed in 5.19.2, 6.1.9, 6.2.1. Upgrade to this version or later.
  5. Is CVE-2025-66168 exploitable, and should I be worried? Whether CVE-2025-66168 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2025-66168 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2025-66168?
    • Upgrade org.apache.activemq:apache-activemq to 5.19.2 or later
    • Upgrade org.apache.activemq:apache-activemq to 6.1.9 or later
    • Upgrade org.apache.activemq:apache-activemq to 6.2.1 or later
    • Upgrade org.apache.activemq:activemq-all to 5.19.2 or later
    • Upgrade org.apache.activemq:activemq-all to 6.1.9 or later
    • Upgrade org.apache.activemq:activemq-all to 6.2.1 or later
    • Upgrade org.apache.activemq:activemq-mqtt to 5.19.2 or later
    • Upgrade org.apache.activemq:activemq-mqtt to 6.1.9 or later
    • Upgrade org.apache.activemq:activemq-mqtt to 6.2.1 or later

Other vulnerabilities in org.apache.activemq:apache-activemq

CVE-2026-40466CVE-2026-41043CVE-2026-39304CVE-2026-40046CVE-2025-66168

Stop the waste.
Protect your environment with Kodem.