Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
Maven

CVE-2025-66168

MEDIUM

CVE-2025-66168 is a medium-severity (CVSS 5.4) CWE-190 vulnerability in org.apache.activemq:apache-activemq. O3 Security confirms whether CVE-2025-66168 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

Apache ActiveMQ, Apache ActiveMQ All Module, Apache ActiveMQ MQTT Module: MQTT control packet remaining length field is not properly validated

Also known asBIT-activemq-2025-66168GHSA-c825-6ph3-4h84
Published
Mar 4, 2026
Updated
Jul 15, 2026
Affected
9 pkgs
Patched
9 / 9
Exploits
None indexed

Real-World Exposure

9 pkgs affected
org.apache.activemq:apache-activemqorg.apache.activemq:apache-activemqorg.apache.activemq:apache-activemqorg.apache.activemq:activemq-allorg.apache.activemq:activemq-allorg.apache.activemq:activemq-allorg.apache.activemq:activemq-mqttorg.apache.activemq:activemq-mqtt+1 more

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.

Description

WARNING:

Users of 6.x should upgrade to 6.2.4 or later as the fix was missed in previous 6.x releases.

See the  following for more details: https://activemq.apache.org/security-advisories.data/CVE-2026-40046-announcement.txt https://www.cve.org/CVERecord?id=CVE-2026-40046

Original Report:

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.

Affected Packages

9 total 9 fixed
EcosystemPackageVulnerable rangeFix
Mavenorg.apache.activemq:apache-activemqall versions5.19.2
Mavenorg.apache.activemq:apache-activemq6.0.0&&< 6.1.96.1.9
Mavenorg.apache.activemq:apache-activemq6.2.0&&< 6.2.16.2.1
Mavenorg.apache.activemq:activemq-allall versions5.19.2
Mavenorg.apache.activemq:activemq-all6.0.0&&< 6.1.96.1.9
Mavenorg.apache.activemq:activemq-all6.2.0&&< 6.2.16.2.1

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.apache.activemq:apache-activemq. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update org.apache.activemq:apache-activemq to 5.19.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2025-66168 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether CVE-2025-66168 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to CVE-2025-66168. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

WARNING: Users of 6.x should upgrade to 6.2.4 or later as the fix was missed in previous 6.x releases. See the  following for more details: https://activemq.apache.org/security-advisories.data/CVE-2026-40046-announcement.txt https://www.cve.org/CVERecord?id=CVE-2026-40046 Original Report: 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 cont
O3 Security · Impact-Aware SCA

Is CVE-2025-66168 in your dependencies?

O3 detects CVE-2025-66168 across Maven dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.