Summary
CVE-2025-59953 is a critical (CVSS 9.8) remote code execution vulnerability in LMDeploy, an open-source toolkit for compressing, deploying, and serving large language models. The flaw resides in LMDeploy’s AsyncRPCServer (lmdeploy/pytorch/engine/mp_engine/zmq_rpc.py), which deserializes incoming network messages with Python’s pickle.loads() without any validation. An unauthenticated, network-adjacent attacker can exploit this to execute arbitrary code on the host running the RPC server.
Technical details
- Root cause: The
call_and_response()function in the RPC server implementation callspickle.loads()directly on data received over the network, with no sanitization, type checking, or allow-listing. Python’s pickle format allows arbitrary code execution during object deserialization by design, making this pattern inherently unsafe when applied to untrusted input. - Trigger conditions: LMDeploy’s
AsyncRPCServeris used to coordinate inter-process/multi-node tensor-parallel and data-parallel inference orchestration via ZeroMQ (ZMQ). Prior to the fix, the RPC server bound totcp://*, exposing it on all network interfaces rather than restricting it to localhost. - Attack vector: Network (AV:N), no authentication or user interaction required. An attacker who can reach the dynamically assigned RPC port — for example, by scanning a network segment where LMDeploy is deployed — can send a crafted malicious pickle payload directly to the endpoint.
- Impact: Successful exploitation results in arbitrary remote code execution with the privileges of the LMDeploy process. This can lead to full host compromise, lateral movement, exfiltration of proprietary model weights or sensitive data, and disruption of the inference service.
Affected software
- Product: InternLM LMDeploy
- Affected versions: 0.9.1 through 0.10.1 (inclusive)
- Patched version: 0.10.2 and later
Severity
- CVSS v3.1 Base Score: 9.8 (Critical)
- Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Mitigation and recommended actions
- Immediate: Upgrade LMDeploy to version 0.10.2 or later, which changes the RPC server binding from
tcp://*to localhost, preventing remote network access to the RPC endpoint. - If immediate patching is not possible:
- Do not expose the LMDeploy RPC port to untrusted networks; restrict access using firewall rules or network segmentation so only trusted local processes/hosts can reach it.
- Run the LMDeploy service under a restricted, low-privilege user account to limit the impact of a potential compromise.
- Use container network namespaces without host networking to isolate the RPC server from the broader network.
- Monitor for unexpected inbound connections or unusual process activity on hosts running LMDeploy inference services.

