Cyber Resilience

CVE-2022-41678

High

Published: 28 November 2023

Published
28 November 2023
Modified
03 November 2025
KEV Added
Patch
CVSS Score v3.1 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.9300 99.8th percentile
Risk Priority 73 60% EPSS · 20% KEV · 20% CVSS

Summary

CVE-2022-41678 is a high-severity Improper Authentication (CWE-287) vulnerability in Apache Activemq. Its CVSS base score is 8.8 (High).

Operationally, ranked in the top 0.2% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.

Deeper analysis

CVE-2022-41678 affects the Jolokia HTTP endpoint exposed by Apache ActiveMQ when Jetty routes requests to org.jolokia.http.AgentServlet. An authenticated user can supply a crafted JSON payload to HttpRequestHandler.handlePostRequest and executeRequest, which reaches ExecHandler.doHandleRequest via reflection and permits invocation of arbitrary MBean operations, including unrestricted deserialization through jdk.management.jfr.FlightRecorderMXBeanImpl on Java 11 and later.

An authenticated attacker can therefore chain calls such as newRecording, setConfiguration (embedding a webshell payload), startRecording, and copyTo to write an executable .jsp file to disk, resulting in remote code execution with the privileges of the ActiveMQ process.

Advisories from the Apache ActiveMQ project state that the default distribution now ships with a more restrictive Jolokia access policy; users are advised to upgrade to ActiveMQ 5.16.6, 5.17.4, 5.18.0 or 6.0.0, or to disable Jolokia or further restrict its allowed actions. The vulnerability carries a CVSS 3.1 score of 8.8 and an EPSS score that has remained near 0.93 since disclosure.

EU & UK References

Vulnerability details

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…

more

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.

CWE(s)

Related Threats

No named actor attribution yet. ATT&CK technique mapping in progress for this CVE.

Affected Assets

apache
activemq
≤ 5.16.6 · 5.17.0 — 5.17.4

Mitigating Controls

Likely Mitigating Controls AI

Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.

addresses: CWE-287

Detects unauthorized successful logons resulting from improper authentication implementations.

addresses: CWE-287

Documented procedures ensure personnel are trained on authentication mechanisms, tangibly lowering the risk of improper authentication being exploited.

addresses: CWE-287

Security awareness training instructs users on secure authentication practices and avoiding credential compromise.

addresses: CWE-287

Training on authentication mechanisms and best practices decreases the occurrence of improper authentication.

addresses: CWE-287

Non-repudiation requires strong authentication mechanisms to irrefutably attribute performed actions to specific individuals or processes.

addresses: CWE-287

Session content review can reveal authentication bypasses or failures in session establishment.

addresses: CWE-287

Review of authentication-related audit records can detect improper authentication mechanisms or bypasses.

addresses: CWE-287

Assessments check authentication mechanisms for correct implementation and effectiveness, reducing successful authentication bypass attempts.

References