# CVE-2025-66168: Apache ActiveMQ, Apache ActiveMQ All Module, Apache ActiveMQ MQTT Module: MQTT control packet remaining length field is not properly validated

- Priority: **Routine**
- Reason: Not severe (CVSS 5.4, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-03-04 · Modified: 2026-04-10
- Aliases: UBUNTU-CVE-2025-66168, DEBIAN-CVE-2025-66168, CGA-25rr-2jq3-3cxh, CGA-2v3f-q9mx-vcgg, CGA-378h-2hhc-wmmp, CGA-578h-3v4v-w4vq, CGA-8gmh-px7g-c974, CGA-8mxx-f373-qg7x, CGA-9fm7-9j3r-xr76, CGA-9pm8-mvxc-qgxm, CGA-cwhh-ggpf-79f9, CGA-ffr6-vvpx-chmv, CGA-h465-mh6p-x6pr, CGA-j3fw-238r-56f3, CGA-j97v-5983-vfrh, CGA-jcx7-rcc3-x6qp, CGA-jm35-mcrc-vggj, GHSA-c825-6ph3-4h84, BIT-activemq-2025-66168, CGA-qjfw-vc5h-2gf5, CGA-w54q-wjv3-g9gp, CGA-wf7p-87gr-qx48, CGA-wm3v-7h53-j83j, CGA-wxc6-82w6-m25g
- Record: https://cvemate.com/vulnerability/CVE-2025-66168 · JSON: https://cvemate.com/vulnerability/CVE-2025-66168/json

## Description

```text
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.
```

## Signals

- CVSS: 8.8 high (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.82%, percentile 58.54%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- apache software foundation apache activemq: \< 5.19.2 \| ≥ 6.0.0, \< 6.1.9 \| ≥ 6.2.0, \< 6.2.1
- apache software foundation apache activemq all module: \< 5.19.2 \| ≥ 6.0.0, \< 6.1.9 \| ≥ 6.2.0, \< 6.2.1
- apache software foundation apache activemq mqtt module: \< 5.19.2 \| ≥ 6.0.0, \< 6.1.9 \| ≥ 6.2.0, \< 6.2.1
- apache activemq: \< 5.19.2 \| ≥ 6.0.0, ≤ 6.1.8 \| 6.2.0
- chainguard apache-activemq-6.1 (Chainguard): All versions (No fix recorded)
- chainguard apache-activemq-fips-6.1 (Chainguard): All versions (No fix recorded)
- chainguard geoserver-2.27-community (Chainguard): \< 2.27.5-r2
- chainguard geoserver-2.28-community (Chainguard): \< 2.28.2-r3
- debian activemq (Debian): All versions (No fix recorded)
- ubuntu activemq (Ubuntu): All versions (No fix recorded)
- org.apache.activemq activemq-all (Maven): \< 5.19.2 \| ≥ 6.0.0, \< 6.1.9 \| ≥ 6.2.0, \< 6.2.1
- org.apache.activemq activemq-mqtt (Maven): \< 5.19.2 \| ≥ 6.0.0, \< 6.1.9 \| ≥ 6.2.0, \< 6.2.1
- org.apache.activemq apache-activemq (Maven): \< 5.19.2 \| ≥ 6.0.0, \< 6.1.9 \| ≥ 6.2.0, \< 6.2.1

## References

- <https://lists.apache.org/thread/13n8mkrb2jf2y6yyhpgrkmpqcm7djyto>
- <https://www.cve.org/CVERecord?id=CVE-2026-40046>
- <https://activemq.apache.org/security-advisories.data/CVE-2026-40046-announcement.txt>
- <http://www.openwall.com/lists/oss-security/2026/03/03/5>
- <https://ubuntu.com/security/CVE-2025-66168>
- <https://www.cve.org/CVERecord?id=CVE-2025-66168>
- <https://security-tracker.debian.org/tracker/CVE-2025-66168>
- <https://repo.maven.apache.org/maven2>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/66xxx/CVE-2025-66168.json>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-66168>
- <https://github.com/apache/activemq>

---

Data as of 2026-12-05T05:00:24.834Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
