CVE-2026-42588

Apache ActiveMQ Broker, Apache ActiveMQ All, Apache ActiveMQ: Remote Code Execution via Jolokia addNetworkConnector

Published Jun 1, 2026 CVSS 3.1 · 8.1 High EPSS < 1% KEV · Not listed
Description
Improper Input Validation, Improper Control of Generation of Code ('Code Injection') vulnerability in Apache ActiveMQ Broker, Apache ActiveMQ All, Apache ActiveMQ.

Apache ActiveMQ Classic exposes the Jolokia JMX-HTTP bridge at /api/jolokia/ on the web console. The default Jolokia access policy permits exec operations on all ActiveMQ MBeans (org.apache.activemq:*), including
BrokerService.addNetworkConnector(String).

An authenticated attacker can invoke these operations with a crafted discovery URI that triggers the VM transport's brokerConfig parameter using the "masterslave:// " URL which can allow loading a Spring XML application context using ResourceXmlApplicationContext.
Because Spring's ResourceXmlApplicationContext instantiates all singleton beans before the BrokerService validates the configuration, arbitrary code execution occurs on the broker's JVM through bean factory methods such as Runtime.exec().
This issue affects Apache ActiveMQ Broker: before 5.19.7, from 6.0.0 before 6.2.6; Apache ActiveMQ All: before 5.19.7, from 6.0.0 before 6.2.6; Apache ActiveMQ: before 5.19.7, from 6.0.0 before 6.2.6.

Users are recommended to upgrade to version 5.19.7 or 6.2.6, which fixes the issue.

Analysis

AI-generated

Technical impact

Apache ActiveMQ exposes a Jolokia JMX–HTTP bridge that, by default, allows authenticated actors to issue exec operations on all ActiveMQ MBeans, including BrokerService.addNetworkConnector(String). When a crafted discovery URI is supplied, the underlying VM transport uses a masterslave:// URL that triggers a Spring XML application context, and before the broker validates the configuration, Spring instantiates singleton beans. This enables arbitrary code execution in the broker’s JVM via bean factory methods such as Runtime.exec(), providing full control over the host. The weakness resides in improper input validation (CWE‑20) and improper control of code generation (CWE‑94).

Affected Systems

Apache ActiveMQ Broker, Apache ActiveMQ All, and Apache ActiveMQ are affected for versions before 5.19.7 and from 6.0.0 up to and including 6.2.5 (i.e., before 6.2.6). These builds expose a Jolokia endpoint that allows authenticated users to execute operations on broker MBeans.

Risk and Exploitability

The vulnerability is enabled by the default Jolokia policy and requires only that the attacker authenticate against the broker. Because the exploit leverages Java code parsing and bean instantiation, once the attacker succeeds they obtain a full local execution environment on the broker’s host. The CVSS score of 8.1 indicates high severity, while the EPSS score of < 1% suggests a low probability of exploitation in the wild. No publicly known exploit is listed by CISA KEV. The likely attack vector is an authenticated user exploiting the /api/jolokia/ endpoint.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to Apache ActiveMQ 5.19.7 or 6.2.6
  • Reconfigure the Jolokia access policy to disallow exec operations on BrokerService MBeans or set it to read‑only mode
  • Restrict network access to the /api/jolokia/ endpoint using firewall or routing policies
  • Ensure authentication credentials are strong and regularly rotated

Generated by OpenCVE AI on June 1, 2026 at 16:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-hg6c-8mvr-jqc9 Apache ActiveMQ Broker, Apache ActiveMQ All, Apache ActiveMQ have a Code Injection issue
History
Type Values Removed Values Added
First Time appeared Apache activemq All
Vendors & Products Apache activemq All
Type Values Removed Values Added
First Time appeared Apache
Apache activemq
Apache activemq Broker
CPEs cpe:2.3:a:apache:activemq:*:*:*:*:*:*:*:*
cpe:2.3:a:apache:activemq_broker:*:*:*:*:*:*:*:*
Vendors & Products Apache
Apache activemq
Apache activemq Broker
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Improper Input Validation, Improper Control of Generation of Code ('Code Injection') vulnerability in Apache ActiveMQ Broker, Apache ActiveMQ All, Apache ActiveMQ. Apache ActiveMQ Classic exposes the Jolokia JMX-HTTP bridge at /api/jolokia/ on the web console. The default Jolokia access policy permits exec operations on all ActiveMQ MBeans (org.apache.activemq:*), including BrokerService.addNetworkConnector(String). An authenticated attacker can invoke these operations with a crafted discovery URI that triggers the VM transport's brokerConfig parameter using the "masterslave:// " URL which can allow loading a Spring XML application context using ResourceXmlApplicationContext. Because Spring's ResourceXmlApplicationContext instantiates all singleton beans before the BrokerService validates the configuration, arbitrary code execution occurs on the broker's JVM through bean factory methods such as Runtime.exec(). This issue affects Apache ActiveMQ Broker: before 5.19.7, from 6.0.0 before 6.2.6; Apache ActiveMQ All: before 5.19.7, from 6.0.0 before 6.2.6; Apache ActiveMQ: before 5.19.7, from 6.0.0 before 6.2.6. Users are recommended to upgrade to version 5.19.7 or 6.2.6, which fixes the issue.
Title Apache ActiveMQ Broker, Apache ActiveMQ All, Apache ActiveMQ: Remote Code Execution via Jolokia addNetworkConnector
Weaknesses CWE-20
CWE-94
References
Weaknesses
  • CWE-20

    Improper Input Validation

  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

Sources

Status
PUBLISHED
Assigner
apache
Published
Updated
Jun 2, 2026, 3:55 AM
Reserved
Apr 28, 2026, 8:59 PM
Status
Analyzed
Published
Jun 1, 2026, 9:16 AM
Modified
Jul 22, 2026, 7:10 AM