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.
Published: 2026-06-01
Score: 8.1 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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

No advisories yet.

History

Wed, 03 Jun 2026 02:30:00 +0000

Type Values Removed Values Added
First Time appeared Apache activemq All
Vendors & Products Apache activemq All

Mon, 01 Jun 2026 17:15:00 +0000

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

Mon, 01 Jun 2026 15:30:00 +0000

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'}


Mon, 01 Jun 2026 09:30:00 +0000

Type Values Removed Values Added
References

Mon, 01 Jun 2026 09:15:00 +0000

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

Subscriptions

Apache Activemq Activemq All Activemq Broker
cve-icon MITRE

Status: PUBLISHED

Assigner: apache

Published:

Updated: 2026-06-02T03:55:44.029Z

Reserved: 2026-04-28T20:59:40.750Z

Link: CVE-2026-42588

cve-icon Vulnrichment

Updated: 2026-06-01T07:47:43.660Z

cve-icon NVD

Status : Analyzed

Published: 2026-06-01T09:16:19.137

Modified: 2026-06-01T17:06:00.667

Link: CVE-2026-42588

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-02T20:54:59Z

Weaknesses
  • CWE-20

    Improper Input Validation

  • CWE-94

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