CVE-2022-41678 Apache ActiveMQ: Insufficient API restrictions on Jolokia allow authenticated users to perform RCE
Apache ActiveMQ: Jolokia에 대한 API 제한으로 인증 된 사용자가 RCE를 수행 할 수 없음
설명
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.
사용자가 Jolokia에서 인증되면 잠재적으로 임의의 코드 실행을 트리거 할 수 있습니다. 자세한 내용은 ActiveMQ 구성에서 jetty는 org.jolokia.http.AgentServlet이 /api/jolokia에 대한 핸들러 요청을 허용함 org.jolokia.http.HttpRequestHandler#handlePostRequest 는 JSONObject를 통해 JmxRequest를 생성할 수 있습니다. org.jolokia.http.HttpRequestHandler#executeRequest를 호출합니다. 이 함수는 다음을 포함합니다. 더 깊은 호출 스택으로, org.jolokia.handler.ExecHandler#doHandleRequest는 refection을 통해 호출될 수 있습니다. 이것은 다양한 mbeans를 통해 RCE로 이어질 수 있습니다. 한 가지 예는 jdk.management.jfr.FlightRecorderMXBeanImpl에 제한 없는 역직렬화(deserialization) 이며, 11 이상의 Java 버전에 존재 합니다. 1 newrecording을 호출합니다. 2 호출 설정Configuration. 그리고 웹쉘 데이터가 숨어 있습니다. 3. startrecording을 호출합니다. 4 copyTo 메서드 호출. 웹쉘은 .jsp 파일에 기록될 것이다. 완화는 Jolokia에서 승인 된 작업을 (기본적으로) 제한하거나 Jolokia를 비활성화하는 것입니다. 보다 제한적인 Jolokia 구성이 기본 ActiveMQ 배포에서 정의되었습니다. 업데이트된 Jolokia 구성(5.16.6, 5.17.4, 5.18.0, 6.0.0)을 포함하여 ActiveMQ 배포 버전으로 업그레이드하는 것이 좋습니다.
영향 받는 제품 제품 1개
-
해결 버전 있음
Apache Software Foundation
Apache ActiveMQ
영향 받는 버전
- 5.16.6 미만
- 5.17.0 이상 5.17.4 미만
해결 버전
- 5.16.6 이상
- 5.17.4 이상
- 5.18.0
- 6.0.0
참고 자료 4건
- activemq.apache.org https://activemq.apache.org/security-advisories.data/CVE-2022-41678-announcement.txt (새 창)
- lists.apache.org https://lists.apache.org/thread/7g17kwbtjl011mm4tr8bn1vnoq9wh4sl (새 창)
- security.netapp.com https://security.netapp.com/advisory/ntap-20240216-0004/ (새 창)
- openwall.com https://www.openwall.com/lists/oss-security/2023/11/28/1 (새 창)