This post is part of our Apache ActiveMQ® CVE guide. It explains how the flaw works, who is exposed, and why Apache’s workaround, mutual TLS, is worth deploying even after you patch.
CVE-2025-27533 at a glance
| Detail | Value |
| Title (Apache) | Unchecked buffer length can cause excessive memory allocation |
| Weakness | CWE-789, memory allocation with excessive size value |
| CVSS | 7.5 High (NIST, CVSS 3.1, AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H); 6.9 Medium (Apache, CVSS 4.0) |
| Affected | 5.16.0 to 5.16.7, 5.17.0 to 5.17.6, 5.18.0 to 5.18.6, 6.0.0 to 6.1.5 |
| Fixed in | 5.16.8, 5.17.7, 5.18.7, 6.1.6; 5.19.0+ not affected |
| Disclosed | 6 May 2025 (Apache, oss-security); NVD published 7 May 2025 |
| Workaround | Mutual TLS |
| Exploited | No reports; not in the CISA KEV catalog. A public proof-of-concept exists. |
Sources: Apache advisory, NVD, oss-security announcement, AMQ-6596.
The scores disagree on privileges: NIST’s vector needs none, while Apache’s CVSS 4.0 vector assumes high privileges. The advisory text names no login requirement, and the original crash happened before login, so plan around NIST’s reading.
The original report was filed against 5.13 and 5.14, which never got a fix, so treat anything older than 5.16 as affected too.
How the attack works
OpenWire frames start with a size prefix. Apache ActiveMQ® has long checked that prefix against wireFormat.maxFrameSize. The gap was inside the frame: many OpenWire commands contain nested byte arrays and byte sequences, each with its own length field, and the broker allocated whatever those fields said without checking them against anything.
The bug was first reported as AMQ-6596. A broker crashed with java.lang.OutOfMemoryError: Java heap space during a Qualys vulnerability scan. The stack trace showed an attempt to allocate 2,131,230,728 bytes, about 2 GB, while unmarshalling a WireFormatInfo command. That is the first command a client sends, before any login. The reporter had set maxFrameSize to 100 MB and it made no difference, because the oversized value was nested inside a frame that passed the check.
The fix, committed in January 2025, checks every nested buffer length before allocating. It keeps a running total of nested buffers and rejects the frame if that total exceeds the frame’s declared size. Each buffer is also checked against maxFrameSize. The change is in the shared OpenWire code in activemq-client, so it protects Java clients as well as brokers.
Who is exposed
Any affected broker whose OpenWire port is reachable by someone you don’t trust is exposed. That includes flat internal networks, where one compromised host is enough. The original crash came from an authorized security scan, not an attacker.
Three factors raise the priority:
- A public proof-of-concept. A Python script targeting this flaw was posted to Exploit-DB as EDB-52288 on 9 May 2025, two days after the NVD listing. We have not tested it.
- A high EPSS score. About 9% probability of exploitation within 30 days, around the 95th percentile of scored CVEs, as of 3 November 2026. EPSS changes daily: check the current value.
- End-of-life fix lines. 5.16.x, 5.17.x, 5.18.x and 6.1.x no longer receive updates. A broker patched to 5.18.7 is safe from this CVE but exposed to every 2026 advisory.
Java OpenWire clients on affected activemq-client versions are exposed in the other direction: a malicious or impersonated broker can exhaust the client’s heap.
Brokers still on 5.16, 5.17 or 5.18?
Why mutual TLS is Apache’s workaround
The advisory says the flaw affects brokers “when not using mutual TLS connections”. The reason is ordering. On an ssl:// connector with transport.needClientAuth=true, the TLS handshake must complete before the broker reads any OpenWire data, and the handshake fails unless the peer presents a certificate signed by a CA in the broker’s truststore. A scanner or attacker without such a certificate never reaches the vulnerable parser.
Plain Apache ActiveMQ® TLS without client certificates doesn’t help: anyone can complete the handshake and send the same frame.
This matters beyond one CVE. Seven of the 25 Apache ActiveMQ® advisories published in 2026 were denial-of-service flaws, and at least five could be triggered without logging in. None of their advisories mentions mutual TLS. But because the Apache ActiveMQ® TLS transports finish the handshake before parsing, a connector that requires client certificates should keep an unknown peer away from most of them:
| CVE (2026) | Where the bug is | Pre-auth? | Would mutual TLS stop an unknown peer? |
| CVE-2026-50734 | OpenWire wire format negotiation | Yes | Yes, on a TLS connector |
| CVE-2026-50750 | OpenWire, regression in 5.19.7 / 6.2.6 | Yes | Yes, on a TLS connector |
| CVE-2026-49432 | STOMP negative content-length | Yes | Yes, on a TLS connector |
| CVE-2026-53916 | STOMP NIO header buffer | Yes | Yes, on a TLS connector |
| CVE-2026-59878 | AMQP NIO frame size | Yes | Yes, on a TLS connector |
| CVE-2026-39304 | TLS 1.3 KeyUpdate in NIO SSL | Not stated | Narrows it: only peers with a trusted certificate can reach this stage |
| CVE-2026-53917 | OpenWire message properties | No (authenticated) | No: attacker already has access |
The last column is our analysis of the Apache ActiveMQ® transport code, not a statement from Apache. All seven are fixed in 5.19.9 and 6.2.8 or later. We covered the full 2026 wave in State of Apache ActiveMQ® Security in 2026. Read the full roundup →
Setting up mutual TLS on Apache ActiveMQ®
Our Apache ActiveMQ® Security Hardening Guide covers the base setup: generating keystores and truststores, the broker’s sslContext element, TLS protocol versions and the client-side connection factory.
Here we focus on the three steps that turn TLS into a defense against this class of bug.
1. Require client certificates and remove the plaintext OpenWire transport.
Mutual TLS protects only the connectors that use it. The default activemq.xml still ships a plaintext tcp://0.0.0.0:61616 OpenWire connector, so leaving it in place leaves the vulnerable path open.
<sslContext> |
Put only the CA that signs your client certificates in the broker’s truststore. A truststore full of public CAs would accept any certificate those CAs issued. If you use nio+ssl:// instead, test that client certificates are actually required before relying on it.
2. Map certificates to users.
A certificate proves who the client is; it doesn’t say what the client may do. The Apache ActiveMQ® jaasCertificateAuthenticationPlugin with TextFileCertificateLoginModule maps a certificate’s subject DN to a user name, and the user to groups, so the authorization rules you already use keep working. Without it, any certificate your CA issued gets whatever access the connector allows.
3. Verify from outside.
Confirm the broker rejects a connection without a certificate:
openssl s_client -connect broker.example.com:61617 -tls1_3 </dev/null
The output should show the broker refusing the connection, with an alert such as “certificate required”. With TLS 1.3 the alert can arrive just after the handshake appears to finish, so read the whole output. Repeat with -cert client.pem -key client.key and confirm it succeeds. Check every port in transportConnectors, not just OpenWire.
What mutual TLS doesn’t do
- It doesn’t stop anyone who holds a valid certificate. A compromised application server can still send a malicious frame. Keep issuing certificates per application, so you can revoke one.
- It doesn’t fix the bug. The parser is still vulnerable on an unpatched broker. Apache’s advisory presents mutual TLS as a way for existing users to “mitigate the risk on affected brokers”, not as a substitute for upgrading.
- It doesn’t cover HTTP. The web console and Jolokia on port 8161 are a separate surface with their own CVEs, listed in our CVE guide.
- It adds operational work. Every client needs a certificate, and an expired one is a self-inflicted outage. Track expiry dates like broker health.
Defense in depth: frame size and connection limits
The fix limits nested buffers to the size the frame declares. The frame’s declared size is limited only by wireFormat.maxFrameSize, and in code that defaults to Long.MAX_VALUE. The shipped activemq.xml sets it explicitly: 100 MB through 5.19.8 and 6.2.7, then 10 MB from 5.19.9 and 6.2.8. If you carried an older activemq.xml forward through upgrades, or wrote your own, check every connector URI for a wireFormat.maxFrameSize value.
Set it to your largest real message plus headroom, and pair it with maximumConnections. Then watch broker heap and connection counts over JMX and alert on sudden jumps; a parser attack shows up as a heap spike before the broker falls over. The meshIQ Console for Apache ActiveMQ® tracks those signals across every broker.
Rolling out mutual TLS without breaking clients?
CVE-2025-27533 remediation checklist
- Upgrade brokers to a supported release: 5.19.11 or 6.3.2 or later. The latest are 5.19.12, 6.3.3 and 6.4.0 (27 October 2026). These also fix the 2026 denial-of-service advisories.
- Upgrade activemq-client in Java applications to the same line.
- Remove or firewall the plaintext tcp:// connector, and every protocol connector you don’t use.
- Require client certificates (transport.needClientAuth=true) on remaining connectors, with a truststore holding only your client CA.
- Map certificate DNs to users and groups, so authorization still applies.
- Set wireFormat.maxFrameSize and maximumConnections on every connector.
- Monitor heap usage, connection counts and certificate expiry, with alerts.
Talk to Apache ActiveMQ® Support →
See also: Apache ActiveMQ® CVE Guide: Complete Vulnerability Reference, part of our Apache ActiveMQ® CVE series.
Frequently asked questions
CVE-2025-27533 is a denial-of-service flaw in the Apache ActiveMQ® OpenWire unmarshalling code. Buffer lengths inside a frame were not validated, so a crafted frame could make the broker allocate enough memory to exhaust its heap. NIST scores it 7.5 High.
Apache ActiveMQ® 5.16.8, 5.17.7, 5.18.7 and 6.1.6 fix it, and 5.19.0 and later were never affected. All of those lines except 5.19.x are end-of-life, so upgrade to 5.19.11 or 6.3.2 or later to also fix the 2026 advisories.
It mitigates it. Apache’s advisory says existing users may implement mutual TLS to mitigate the risk on affected brokers. A connector that requires client certificates rejects peers without a trusted certificate during the TLS handshake, before any OpenWire data is parsed. A client holding a valid certificate can still exploit an unpatched broker.
There are no public reports of exploitation, and it is not in the CISA Known Exploited Vulnerabilities catalog. A public proof-of-concept script has been on Exploit-DB since May 2025, so treat exposed brokers as at risk.
Give the broker’s sslContext a truststore holding your client CA, add transport.needClientAuth=true to the ssl:// connector URI, and remove the plaintext tcp:// connector.
CVE-2025-27533’s class of bug produced at least five more pre-authentication denial-of-service advisories in 2026. Patching closes each one; mutual TLS keeps unknown peers away from the next. meshIQ’s Apache ActiveMQ® engineers upgrade your brokers, roll out mutual TLS without breaking clients, and stay on call for the next advisory.