Skip to content
RCE Write-up Advanced

Critical RCE Flaw in Apache ActiveMQ via Jolokia Interface (CVE-2

The Jolokia interface in Apache ActiveMQ allowed authenticated attackers to use JMX and log4j2 MBeans to write a web shell to disk and execute arbitrary code. The text claims this gave full control of the server.

AerieWhole123 Follow

Published on medium.com

Apache ActiveMQ is a popular open-source message broker used to facilitate communication between different software systems. In November 2023, a remote code execution (RCE) vulnerability (CVE-2022–41678) affecting the Jolokia interface in ActiveMQ was publicly disclosed.

AerieWhole123, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the Jolokia endpoint exposed JMX operations that let authenticated users invoke dangerous MBeans, such as Java Flight Recorder or log4j2, to write files to disk.

What the attacker needed

Authenticated access or weak/default credentials; Jolokia endpoint exposed; certain configurations present

The fix

Apache released patches; upgrade to 5.16.6+, 5.17.4+, or preferably 5.18.0 or 6.0.0, and as workarounds disable Jolokia, restrict access, enable authentication, and avoid exposing port 8161.

How it was found

  1. Bypass authentication or use default credentials.
  2. Target the /api/jolokia interface using JMX commands.
  3. Use Java Flight Recorder or log4j2 MBeans to write a web shell to disk.
  4. Access the web shell to gain remote command execution.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

ActiveMQ is a message broker that helps different programs talk to each other. It has a management interface called Jolokia that lets administrators run commands on the server. If an attacker can log in, they can abuse this interface to write a malicious file that runs commands on the server, taking it over.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by AerieWhole123

View all

16 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.