Apache ActiveMQ: Unchecked buffer length can cause excessive memory allocation

Description

Memory Allocation with Excessive Size Value vulnerability in Apache ActiveMQ.

During unmarshalling of OpenWire commands the size value of buffers was not properly validated which could lead to excessive memory allocation and be exploited to cause a denial of service (DoS) by depleting process memory, thereby affecting applications and services that rely on the availability of the ActiveMQ broker when not using mutual TLS connections.
This issue affects Apache ActiveMQ: from 6.0.0 before 6.1.6, from 5.18.0 before 5.18.7, from 5.17.0 before 5.17.7, before 5.16.8. ActiveMQ 5.19.0 is not affected.

Users are recommended to upgrade to version 6.1.6+, 5.19.0+, 5.18.7+, 5.17.7, or 5.16.8 or which fixes the issue.

Existing users may implement mutual TLS to mitigate the risk on affected brokers.

Basic information

Type
reviewed
Severity
medium
Advisory on GitHub
Open advisory ↗
Repository advisory
Source code
Browse source ↗
Published (advisory)
2025-05-07 09:31:19 UTC
Updated
2025-11-03 21:34:51 UTC
GitHub reviewed
2025-05-07 15:25:41 UTC
NVD published
2025-05-07

EPSS Score

Score Percentile
2.25% 84.50%

CVSS Scores

Base score Version Severity Vector
7.5 3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
6.9 4.0
CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H/AU:Y/R:A/V:D/RE:M/U:Red Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network.
Attack complexity (AC:L)
Exploitation conditions are straightforward and stable.
Attack requirements (AT:P)
Additional preconditions must be present for exploitation.
Privileges required (PR:H)
High privileges are required.
User interaction (UI:N)
No user interaction is required.
Vulnerable system confidentiality impact (VC:N)
No confidentiality impact on the vulnerable system.
Vulnerable system integrity impact (VI:N)
No integrity impact on the vulnerable system.
Vulnerable system availability impact (VA:H)
High availability impact on the vulnerable system.
Subsequent system confidentiality impact (SC:N)
No confidentiality impact on subsequent systems.
Subsequent system integrity impact (SI:N)
No integrity impact on subsequent systems.
Subsequent system availability impact (SA:H)
High availability impact on subsequent systems.
Automatable (supplemental) (AU:Y)
Yes: all four kill-chain steps (reconnaissance, weaponization, delivery, exploitation) can be automated.
Recovery (supplemental) (R:A)
Automatic: services recover on their own after an attack.
Value density (supplemental) (V:D)
Diffuse: a single exploit event controls relatively limited resources (e.g., one client).
Vulnerability response effort (supplemental) (RE:M)
Moderate effort (remote update, disable subsystem, simple upgrade with minor service impact).
Provider urgency (supplemental) (U:RED)
Red: provider rates highest urgency.

Identifiers

CWEs

CWE id Name
CWE-789 Memory Allocation with Excessive Size Value

Affected packages (8)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
maven org.apache.activemq:activemq-openwire-legacy < 5.16.8 5.16.8
maven org.apache.activemq:activemq-client < 5.16.8 5.16.8
maven org.apache.activemq:activemq-openwire-legacy >= 5.17.0, < 5.17.7 5.17.7
maven org.apache.activemq:activemq-openwire-legacy >= 5.18.0, < 5.18.7 5.18.7
maven org.apache.activemq:activemq-openwire-legacy >= 6.0.0, < 6.1.6 6.1.6
maven org.apache.activemq:activemq-client >= 5.17.0, < 5.17.7 5.17.7
maven org.apache.activemq:activemq-client >= 5.18.0, < 5.18.7 5.18.7
maven org.apache.activemq:activemq-client >= 6.0.0, < 6.1.6 6.1.6

References

cvelogic Threat Intelligence