🔍 CVE-2022-41678

8.8
CVSS Score
HIGH
2023-11-28
2026-06-17 05:03
✅ 완료

🇰🇷 한글 설명

Jolokia에 인증된 사용자가 임의의 코드를 실행할 수 있는 취약점입니다. Java 11 이상의 환경에서 FlightRecorderMXBeanImpl의 제한되지 않은 역직렬화를 악용하여 웹쉘을 생성하고 원격 코드 실행(RCE)이 가능합니다.

💡 쉬운 설명

해커가 인증된 권한을 이용해 서버에 몰래 명령어를 입력하고 웹사이트를 조종할 수 있는 보안 구멍입니다. 이를 통해 서버에 악성 파일을 저장하고 시스템 전체를 장악할 위험이 있습니다.

🇺🇸 원문 (English)

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.

📍 영향받는 시스템

ActiveMQ (Jolokia가 활성화된 버전)

⚔️ 공격 벡터

인증된 사용자가 Jolokia API(/api/jolokia)를 통해 특정 MBean을 호출하여 웹쉘을 생성하는 방식

🛡️ 대응 방법

ActiveMQ를 최신 보안 패치 버전(5.16.6, 5.17.4, 5.18.0, 6.0.0 이상)으로 업그레이드하거나 Jolokia 설정을 제한/비활성화하십시오.

🔧 검증 코드

Jolokia 서비스가 응답하는지 확인하고, 현재 사용 중인 ActiveMQ 및 Jolokia의 버전을 체크하여 취약 버전 여부를 판단합니다.

Shell / Script
curl -s -X GET http://<TARGET_IP>:<PORT>/api/jolokia/version | grep -E 'jolokia'

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Spring Data REST