Skip to content
RCE Write-up Advanced

Understanding CVE-2023–46604: A Threat to Apache ActiveMQ

Apache ActiveMQ's OpenWire protocol failed to validate throwable class types during unmarshalling, allowing instantiation and execution of arbitrary classes. Attackers could use this to run their own code on the server, and the Kinsing malware has been exploiting it to install miners and rootkits on Linux hosts.

securitylit Follow

Published on securitylit.medium.com

CVE-2023–46604 has emerged as a critical vulnerability in Apache ActiveMQ, an open-source message-oriented middleware (MOM) protocol developed by Apache. This vulnerability has been exploited by cybercriminals to execute remote code execution (RCE) attacks, particularly targeting Linux systems with the Kinsing malware…

Security Lit Limited, on securitylit.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 OpenWire unmarshalling code instantiated throwable class types supplied in a message without checking that they were legitimate, allowing arbitrary class instantiation.

Impact

Attackers could execute arbitrary code on the server; Kinsing used this to install cryptocurrency miners, a cronjob for persistence and a rootkit, achieving full system compromise.

What the attacker needed

Network access to an ActiveMQ broker; unpatched ActiveMQ version

The fix

It should be fixed by updating Java OpenWire brokers and clients to the recommended patched versions.

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: software that passes messages between other programs. It reads messages in a binary format called OpenWire, and when it unpacked certain messages it did not check what kind of object was inside. That let an attacker make the server create and run a class of their choosing, which is effectively running their own code on the machine.

What is RCE?

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

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.