🇰🇷 한글 설명
LMDeploy의 PyTorch DistServe/PD-disaggregation 제어 평면에서 ZeroMQ PULL 소켓을 통해 수신된 메시지를 `recv_pyobj()`로 역직렬화할 때 발생하는 취약점입니다. 공격자가 `/distserve/p2p_connect` 엔드포인트를 통해 조작된 피클(pickle) 페이로드를 전달하면 인증 없이 원격 코드 실행(RCE)이 가능합니다.
💡 쉬운 설명
LMDeploy라는 AI 도구에서 데이터를 읽어오는 과정 중 보안이 취약한 방식을 사용하여, 해커가 악성 명령어를 서버에 직접 실행시킬 수 있는 문제입니다. 인증 설정이 되어 있지 않으면 누구나 원격에서 서버를 장악할 수 있어 매우 위험합니다.
🇺🇸 원문 (English)
LMDeploy is a toolkit for compressing, deploying, and serving large language models. Starting in version 0.9.2 and prior to version 0.16.0, LMDeploy's PyTorch DistServe/PD-disaggregation control plane used `recv_pyobj()` to deserialize messages received through a ZeroMQ PULL socket. PyZMQ implements `recv_pyobj()` using Python pickle deserialization, which can execute arbitrary code while reconstructing an object. The peer address used by the receiver was supplied through the `POST /distserve/p2p_connect` HTTP endpoint. An attacker who could reach an affected DistServe API server could cause the server to connect to an attacker-controlled ZeroMQ endpoint and deserialize a crafted pickle payload. API-key authentication is not enabled unless the operator explicitly configures it. As a result, affected DistServe deployments without API keys allowed unauthenticated remote code execution with the privileges of the LMDeploy serving process. This issue affects the PyTorch backend when PD-disaggregation/DistServe is enabled. Ordinary deployments that do not use the affected disaggregated-serving path do not expose this data flow. The fix was released in LMDeploy 0.16.0. Users who cannot upgrade immediately should prevent untrusted clients from reaching `/distserve/*` endpoints, restrict the DistServe HTTP and ZeroMQ control planes to trusted cluster networks, configure API-key authentication, and block arbitrary outbound ZeroMQ connections from serving nodes. These measures reduce exposure but do not make pickle deserialization safe.
📍 영향받는 시스템
LMDeploy 0.9.2 버전부터 0.16.0 미만 버전 (PyTorch backend의 PD-disaggregation/DistServe 활성화 시)
⚔️ 공격 벡터
HTTP 엔드포인트를 통해 공격자가 제어하는 ZeroMQ 주소를 전달하여 악성 피클 객체를 역직렬화 유도
🛡️ 대응 방법
LMDeploy를 0.16.0 이상 버전으로 업그레이드하거나, API 키를 설정하고 `/distserve/*` 경로에 대한 접근을 제한함
🔧 검증 코드
출력된 버전이 0.16.0 미만이면 해당 취약점에 노출된 상태입니다.
pip show lmdeploy | grep Version