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
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| 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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 22.04 LTS | activemq | 5.16.1-1ubuntu0.1 | USN-7268-1 |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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.
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.
- Apache ActiveMQ < 5.16.5/5.17.3 - Remote Code Execution http/cves/2022/CVE-2022-41678.yaml
Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| 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
- USN-6910-1 activemq vulnerabilities Ubuntu Security Notices (USN) · Jun 25, 2026
- DSA-5798-1 activemq - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-3936-1 activemq - security update Debian Security (DSA / DLA) · Mar 9, 2026
- USN-7268-1 activemq vulnerabilities Ubuntu Security Notices (USN) · Feb 10, 2026
- WID-SEC-2023-3022 Apache ActiveMQ: Schwachstelle ermöglicht Codeausführung BSI CERT-Bund (WID) · Oct 29, 2025
- ICSA-25-261-04 Multiple Open-Source Software Vulnerabilities in Hitachi Energy Asset Suite Product CISA ICS & IT advisories · Aug 26, 2025