Overview
CVE-2023-46604 is a critical remote code execution vulnerability in Apache ActiveMQ, the widely-deployed open-source message broker. The vulnerability exists in ActiveMQ's OpenWire protocol handler: a specially crafted ExceptionResponse packet causes the broker to instantiate an arbitrary Java class from the classpath or a remote URL — executing attacker-controlled code. No authentication is required; exploitation requires only network access to ActiveMQ's default OpenWire port (TCP 61616).
Exploitation began within 24 hours of public disclosure. HelloKitty and TellYouThePass ransomware groups were confirmed deploying ransomware via this vulnerability within days, and cryptomining and remote access trojans followed shortly after. The vulnerability received a CVSS 10.0 score, reflecting pre-auth RCE on a widely-deployed middleware component.
What Is Apache ActiveMQ?
Apache ActiveMQ is a high-performance, open-source message broker implementing the Java Message Service (JMS) API and supporting multiple messaging protocols. It is used in enterprise Java applications for asynchronous communication between services — common in e-commerce platforms, financial systems, healthcare applications, and enterprise middleware deployments. ActiveMQ brokers typically run with elevated privileges and are embedded in or adjacent to business-critical application infrastructure, making them attractive targets for ransomware operators seeking to maximize damage.
Affected Versions
| ActiveMQ Version | Vulnerable | Fixed Version |
|---|---|---|
| 5.18.x | Before 5.18.3 | 5.18.3 |
| 5.17.x | Before 5.17.6 | 5.17.6 |
| 5.16.x | Before 5.16.7 | 5.16.7 |
| 5.15.x | Before 5.15.16 | 5.15.16 |
| Legacy 5.x versions | All (end-of-life) | Upgrade required |
| ActiveMQ Legacy OpenWire Module (6.x) | Before 6.1.2 | 6.1.2 |
Technical Details
Root Cause: ClassInfo Deserialization via OpenWire ExceptionResponse
ActiveMQ's OpenWire protocol is a binary wire protocol for JMS messaging. The broker processes incoming OpenWire commands including ExceptionResponse packets. The vulnerability lies in how the broker handles a specific OpenWire command type — the ClassInfo command (opcode 0x1f / 31):
When the broker receives this command, it invokes ClassPathXmlApplicationContext with a URL supplied in the packet. ClassPathXmlApplicationContext is a Spring Framework class that fetches an XML configuration file from the provided URL and instantiates all Spring beans defined in it. A Spring bean definition can execute arbitrary OS commands via the ProcessBuilder or Runtime.exec() bean factories.
The complete exploit:
- Connect to ActiveMQ's OpenWire port (TCP 61616) — no authentication required.
- Send a crafted OpenWire packet with the
ClassInfocommand containing a URL pointing to an attacker-controlled server. - ActiveMQ fetches the XML file from the attacker's server.
- The XML defines a Spring bean that executes the attacker's OS command.
- The command runs as the ActiveMQ process user — typically a service account with broad local privileges.
Why This Is Architecturally Dangerous
The OpenWire port (61616) is the primary broker communication port used by JMS clients and other brokers. It is typically:
- Exposed on all network interfaces by default
- Not authentication-protected in many deployments (authentication is often not configured)
- Expected to be accessible from application servers in the same network segment
This means many ActiveMQ deployments have port 61616 accessible from application tier servers, CI/CD infrastructure, and in some cases from the internet — all positions from which this exploit is trivially weaponizable.
Attack Characteristics
| Attribute | Detail |
|---|---|
| Attack Vector | Network — TCP port 61616 (OpenWire) |
| Authentication Required | None (authentication is optional and often not configured) |
| Outbound Connection Required | Yes — broker must fetch attacker's XML file (mitigated by egress filtering) |
| Code Execution | As the ActiveMQ process user (often root or a privileged service account) |
| Exploit Complexity | Low — single crafted packet; multiple open-source PoCs available within 24 hours |
Discovery
The vulnerability was discovered internally by the Apache ActiveMQ security team (or via responsible disclosure — Apache's advisory does not name an external reporter). The security advisory and fixed versions were released simultaneously on October 25–27, 2023. Mass exploitation began within 24 hours of the announcement, suggesting threat actors were watching for ActiveMQ security updates and reverse-engineered the patch immediately.
Exploitation Context
- Exploitation within 24 hours: Rapid7 and ShadowServer confirmed active exploitation beginning within a day of CVE publication
- HelloKitty ransomware: Confirmed deploying ransomware via CVE-2023-46604 within days of disclosure; HelloKitty (also known as FiveHands) is a ransomware-as-a-service operation targeting enterprise environments
- TellYouThePass ransomware: Also confirmed exploiting the vulnerability for ransomware deployment
- Cryptomining: Multiple cryptomining campaigns (XMRig and others) deployed via CVE-2023-46604
- Remote access trojans: Various RATs deployed for persistent access and data exfiltration
- Ongoing exposure: Many ActiveMQ instances run in internal networks with limited patching cadence, providing a persistent exploitation opportunity; ShadowServer reported thousands of exposed instances months after disclosure
Remediation
Recommended Actions
-
Upgrade ActiveMQ to 5.15.16, 5.16.7, 5.17.6, 5.18.3, or 6.1.2+ immediately. Verify: check the
activemq.jarversion or the startup banner. -
Restrict network access to port 61616. The OpenWire port should only be accessible from known application servers that require it. Block all other inbound access using host-based firewall rules or network ACLs:
# Example iptables rule — allow only application tier iptables -A INPUT -p tcp --dport 61616 -s 10.0.1.0/24 -j ACCEPT iptables -A INPUT -p tcp --dport 61616 -j DROP -
Enable ActiveMQ authentication if not already configured. Anonymous connections to the OpenWire port significantly reduce the barrier to exploitation. Configure
activemq.xmlwith authentication plugins. -
Restrict outbound connections from the ActiveMQ host. The exploit requires the broker to fetch an XML file from an attacker's server. Egress filtering that blocks outbound HTTP/HTTPS from the broker host breaks the exploitation chain for unauthenticated attackers who don't also control inbound access.
-
Check for compromise indicators:
- Unusual processes spawned by the ActiveMQ JVM process
- Unexpected outbound connections from the broker host
- New cron jobs, scheduled tasks, or persistence mechanisms on the broker host
- Presence of XMRig, ransomware encryption activity, or webshells in the ActiveMQ data directory
Key Details
| Property | Value |
|---|---|
| CVE ID | CVE-2023-46604 |
| Vendor / Product | Apache — ActiveMQ |
| NVD Published | 2023-10-27 |
| NVD Last Modified | 2025-11-04 |
| CVSS 3.1 Score | 10 |
| CVSS 3.1 Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:H |
| Severity | CRITICAL |
| CWE | CWE-502 — Deserialization of Untrusted Data |
| CISA KEV Added | 2023-11-02 |
| CISA KEV Deadline | 2023-11-23 |
| Known Ransomware Use | ⚠️ Yes |
CVSS 3.1 Breakdown
Required Action
Timeline
| Date | Event |
|---|---|
| 2023-10-25 | Apache ActiveMQ 5.15.16, 5.16.7, 5.17.6, 5.18.3 released with fix |
| 2023-10-27 | CVE-2023-46604 published; Apache security advisory released |
| 2023-10-28 | Rapid7 and ShadowServer report active exploitation in the wild within 24 hours of disclosure |
| 2023-10-30 | HelloKitty ransomware group confirmed exploiting CVE-2023-46604 for ransomware deployment |
| 2023-11-01 | TellYouThePass ransomware group also confirmed exploiting the vulnerability |
| 2023-11-02 | CISA adds CVE-2023-46604 to KEV catalog |
| 2023-11-23 | CISA BOD 22-01 remediation deadline |
References
| Resource | Type |
|---|---|
| NVD — CVE-2023-46604 | Vulnerability Database |
| CISA KEV Catalog Entry | US Government |
| Apache ActiveMQ Security Advisory — CVE-2023-46604 | Vendor Advisory |
| ActiveMQ RCE PoC — X1r0z | Security Research |
| CVE-2023-46604 RCE Reverse Shell PoC — SaumyajeetDas | Security Research |
| BleepingComputer: Apache ActiveMQ RCE Vulnerability Exploited in Attacks | Security Research |
| Tenable: CVE-2023-46604 Apache ActiveMQ RCE Analysis | Security Research |
| CWE-502 — Deserialization of Untrusted Data | Weakness Classification |