CVE-2022-41678 — apache-activemq
HIGHCVE-2022-41678 is a high-severity (CVSS 8.8) Improper Authentication vulnerability in org.apache.activemq:apache-activemq. 1 public exploit reference exists, so weaponization risk is real. A fix is available for org.apache.activemq:apache-activemq — see the affected versions and patch details below.
Apache ActiveMQ: Insufficient API restrictions on Jolokia allow authenticated users to perform RCE
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
CVE-2022-41678 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE sits: patch-first territory.
Where this sits among everything scored
Of 377,166 CVEs with a current EPSS score, this one falls in the 50–90% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
org.apache.activemq:apache-activemq☕org.apache.activemq:apache-activemqReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
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 Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.apache.activemq:apache-activemq | all versions | 5.16.6org.apache.activemq:apache-activemq:5.16.6 |
| ☕Maven | org.apache.activemq:apache-activemq | ≥ 5.17.0&&< 5.17.4 | 5.17.4org.apache.activemq:apache-activemq:5.17.4 |
Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.apache.activemq:apache-activemq, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.apache.activemq:apache-activemq to 5.16.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-41678 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2022-41678 can be triaged on real exposure rather than presence alone.
Tailored to CVE-2022-41678. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
How to detect CVE-2022-41678
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id cve-2022-41678 -u https://target- Template
- Apache ActiveMQ < 5.16.5/5.17.3 - Remote Code Execution
- Severity
- high
- Impact
- Authenticated attackers can execute arbitrary code on the server, potentially leading to full system compromise.
- Remediation
- Restrict or disable Jolokia, and upgrade to ActiveMQ version 5.16.6, 5.17.4, 5.18.0, or 6.0.0 with updated Jolokia configuration.
Template by ProjectDiscovery nuclei-templates (maciejklimek), MIT licensed. View the full template. Scan only systems you are authorised to test.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This vulnerability is considered moderate severity due to the requirement of authenticated access to exploit the flaw, significantly reducing the risk to systems that enforce strong authentication controls. While it does allow for remote code execution through Jolokia's request handling and Java Management Extensions…
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat AMQ Broker 7 | see advisory | RHSA-2024:2945 |
| Red Hat Fuse 7.13.0 | activemq | RHSA-2024:3354 |
| RHEL-8 based Middleware Containers | amq7/amq-broker-init-rhel8:7.12.0-7 | RHSA-2024:2944 |
Frequently Asked Questions
Is CVE-2022-41678 in your dependencies?
O3 Security finds CVE-2022-41678 across Maven dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.