Skip to content
OpenAdvisories
High · 8.8 Scanner template Public exploit CVE-2022-41678 BIT-activemq-2022-41678EUVD-2023-2884GHSA-53v4-42fg-g287

Apache ActiveMQ: Insufficient API restrictions on Jolokia allow authenticated users to perform RCE

Published Nov 28, 2023 · Updated Nov 3, 2025 · Assigned by apache

Description

Once an user is authenticated on Jolokia, he can potentially trigger arbitrary code execution. 

In details, in ActiveMQ configurations, jetty allows
org.jolokia.http.AgentServlet to handler request to /api/jolokia

org.jolokia.http.HttpRequestHandler#handlePostRequest is able to
create JmxRequest through JSONObject. And calls to
org.jolokia.http.HttpRequestHandler#executeRequest.

Into deeper calling stacks,
org.jolokia.handler.ExecHandler#doHandleRequest can be invoked
through refection. This could lead to RCE through via
various mbeans. One example is unrestricted deserialization in jdk.management.jfr.FlightRecorderMXBeanImpl which exists on Java version above 11.

1 Call newRecording.

2 Call setConfiguration. And a webshell data hides in it.

3 Call startRecording.

4 Call copyTo method. The webshell will be written to a .jsp file.

The mitigation is to restrict (by default) the actions authorized on Jolokia, or disable Jolokia.
A more restrictive Jolokia configuration has been defined in default ActiveMQ distribution. We encourage users to upgrade to ActiveMQ distributions version including updated Jolokia configuration: 5.16.6, 5.17.4, 5.18.0, 6.0.0.

Affected products

VendorProductAffectedFixed
Apache Software Foundation Apache ActiveMQ < 5.16.6, 5.17.0 – < 5.17.4 5.16.6

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 13 activemq 5.17.6+dfsg-1 —
Debian 12 activemq 5.17.2+dfsg-2+deb12u1 DSA-5798-1
Debian 11 activemq 5.16.1-1+deb11u1 DLA-3936-1
ReleasePackageFixed inAdvisory
Ubuntu 22.04 LTS activemq 5.16.1-1ubuntu0.1 USN-7268-1
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 22.04 LTS activemq 5.16.1-1ubuntu0.1~esm1 USN-6910-1
Ubuntu Pro 20.04 LTS activemq 5.15.11-1ubuntu0.1~esm1 USN-6910-1
Ubuntu Pro 18.04 LTS activemq 5.15.8-2~18.04.1~esm1 USN-6910-1
Ubuntu Pro 16.04 LTS activemq 5.13.2+dfsg-2ubuntu0.1~esm1 USN-6910-1

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 3 repositories

  • Catherines77/ActiveMQ-EXPtools ★ 86 · Apr 20, 2026

    Apache ActiveMQ漏洞综合利用工具(CVE-2015-5254,CVE-2016-3088,CVE-2022-41678,CVE-2023-46604,CVE-2024-32114,CVE-2026-34197,CVE-2026-40466, CVE-2026-42588)

  • URJACK2025/CVE-2022-41678 ★ 2 · Oct 14, 2025

    CVE-2022-41678 是 Apache ActiveMQ 中的一个远程代码执行漏洞。该漏洞允许攻击者通过 JMX (Java Management Extensions) 接口修改 Log4j 配置或 JFR (Java Flight Recorder) 配置,从而写入恶意的 JSP webshell 到服务器的 web 目录中,最终实现远程代码执行。

  • mbadanoiu/CVE-2022-41678 ★ 2 · Nov 28, 2024

    CVE-2022-41678: Dangerous MBeans Accessible via Jolokia API in Apache ActiveMQ

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Automated scanner template

A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.

Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.

Affected packages

EcosystemPackageAffectedFixedRecord
Maven org.apache.activemq:apache-activemq < 5.16.6 5.16.6 GHSA-53v4-42fg-g287
Maven org.apache.activemq:apache-activemq >= 5.17.0, < 5.17.4 5.17.4 GHSA-53v4-42fg-g287

Advisories 6

References