High severity · published Nov 28, 2023
CVE-2022-41678
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…
8.8
CVSS
85.8%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)85.8% · higher than 100% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
AC
ActiveMQ · Apache
before 5.16.6; 5.17.0 before 5.17.4 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2022-41678
CVE.org
https://www.cve.org/CVERecord?id=CVE-2022-41678
Vendor Advisory
https://activemq.apache.org/security-advisories.data/CVE-2022-41678-announcement.txt
Mailing List
https://lists.apache.org/thread/7g17kwbtjl011mm4tr8bn1vnoq9wh4sl
security.netapp.com
https://security.netapp.com/advisory/ntap-20240216-0004/
www.openwall.com
https://www.openwall.com/lists/oss-security/2023/11/28/1
lists.debian.org
https://lists.debian.org/debian-lts-announce/2024/10/msg00027.html
More from ActiveMQ
9.8
CVE-2023-46604
Apache ActiveMQ, Apache ActiveMQ Legacy OpenWire Module: Unbounded deserialization causes ActiveMQ to be vulnerable to a remote code execution (RCE) attack
9.8
CVE-2016-3088
The Fileserver web application in Apache ActiveMQ 5.x before 5.14.0 allows remote attackers to upload and execute arbitrary files via an HTTP PUT followed by an HTTP MOVE request
8.8
CVE-2026-34197
Apache ActiveMQ Broker, Apache ActiveMQ All, Apache ActiveMQ: Authenticated users could perform RCE via Jolokia MBeans
9.9
CVE-2021-21345
XStream is vulnerable to a Remote Command Execution attack
9.8
CVE-2021-21350
XStream is vulnerable to an Arbitrary Code Execution attack
