Vulnerability · Published Nov 28, 2023 · Assigned by apache
CVE-2022-41678Apache ActiveMQ: Insufficient API restrictions on Jolokia allow authenticated users to perform RCE
High 8.8
In plain English
A high-severity improper authentication in Apache ActiveMQ from Apache Software Foundation. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 85.7% (higher than 99.7% of all known vulnerabilities). Ready-made attack tooling exists: Nuclei, public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official 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 & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | activemq | 5.17.2+dfsg-2+deb12u1 | DEBIAN-CVE-2022-41678 |
| Debian:12 | activemq | 5.17.2+dfsg-2+deb12u1 | DSA-5798-1 |
| Debian:13 | activemq | 5.17.6+dfsg-1 | DEBIAN-CVE-2022-41678 |
| Maven | org.apache.activemq:apache-activemq | 5.17.4 | GHSA-53v4-42fg-g287 |
| Maven | org.apache.activemq:apache-activemq | 5.16.6 | GHSA-53v4-42fg-g287 |
| Ubuntu:22.04:LTS | activemq | 5.16.1-1ubuntu0.1 | USN-7268-1 |
| Ubuntu:22.04:LTS | activemq | 5.16.1-1ubuntu0.1 | UBUNTU-CVE-2022-41678 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Apache Software Foundation | Apache ActiveMQ | 0 – before 5.16.65.17.0 – before 5.17.4 |
Weakness: CWE-287
References
- https://activemq.apache.org/security-advisories.data/CVE-2022-41678-announcement.txt vendor-advisory
- https://lists.apache.org/thread/7g17kwbtjl011mm4tr8bn1vnoq9wh4sl vendor-advisory
- https://www.openwall.com/lists/oss-security/2023/11/28/1
- https://security.netapp.com/advisory/ntap-20240216-0004/
- https://lists.debian.org/debian-lts-announce/2024/10/msg00027.html