IM
IronMonkey Threat Research

CVE-2022-41678 HIGH

Published: 2023-11-28 | Last Modified: 2025-11-03 | Status: Modified

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.

Additional Descriptions (1)

Una vez que un usuario se autentica en Jolokia, potencialmente puede desencadenar la ejecución de código arbitrario. En detalles, en las configuraciones de ActiveMQ, jetty permite que org.jolokia.http.AgentServlet maneje la solicitud a /api/jolokia org.jolokia.http.HttpRequestHandler#handlePostRequest puede crear JmxRequest a través de JSONObject. Y llamadas a org.jolokia.http.HttpRequestHandler#executeRequest. En pilas de llamadas más profundas, org.jolokia.handler.ExecHandler#doHandleRequest puede invocar mediante reflexión. Y luego, RCE se puede lograr a través de jdk.management.jfr.FlightRecorderMXBeanImpl que existe en la versión de Java superior a 11. 1 Call newRecording. 2 Call setConfiguration. Y en él se esconden datos de un webshell. 3 Call startRecording. 4 Call copyTo method. El webshell se escribirá en un archivo .jsp. La mitigación es restringir (de forma predeterminada) las acciones autorizadas en Jolokia o desactivar Jolokia. Se ha definido una configuración de Jolokia más restrictiva en la distribución predeterminada de ActiveMQ. Alentamos a los usuarios a actualizar a la versión de distribuciones ActiveMQ, incluida la configuración actualizada de Jolokia: 5.16.6, 5.17.4, 5.18.0, 6.0.0.

CVSS Metrics

Base Score: 8.8 (HIGH)

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Attack VectorNETWORK
Attack ComplexityLOW
Privileges RequiredLOW
User InteractionNONE
ScopeUNCHANGED
Confidentiality ImpactHIGH
Integrity ImpactHIGH
Availability ImpactHIGH

Source: [email protected]

Type: Primary

Exploitability Score: 2.8

Impact Score: 5.9

Weaknesses

Source Type Description
[email protected] Secondary
en CWE-287

Affected Products

Vendor Product Version Update Type
apache activemq * <built-in method update of dict object at 0x72a999778140> Application
apache activemq * <built-in method update of dict object at 0x72a9b0a6cd00> Application

Affected Configurations

Operator: OR

Vulnerable CPE
Yes cpe:2.3:a:apache:activemq:*:*:*:*:*:*:*:*
Yes cpe:2.3:a:apache:activemq:*:*:*:*:*:*:*:*
Notification
Message here