CVE-2025-59953
niche1Unauthenticated Pickle Deserialization RCE in InternLM lmdeploy RPC Server
LMdeploy's AsyncRPCServer (zmq_rpc.py) passes incoming RPC messages directly to pickle.loads() without any sanitization (CWE-502), so anyone who can send a request to the server's TCP endpoint can have it deserialize attacker-controlled pickle data. Because pickle deserialization can instantiate arbitrary objects, an attacker reaching the RPC port gains arbitrary code execution on the host; the researcher demonstrated a full reverse shell from a crafted request. The server performs no validation of the connecting IP, and although its port is randomized, an attacker can find it by port scanning, so any network-reachable deployment is at risk. Affected users are operators running lmdeploy's RPC server component (typically in distributed/multi-node LLM inference setups), especially where the service is reachable beyond localhost or from untrusted networks. No exploitation in the wild is known and the flaw is not in CISA KEV, though the advisory includes working reproduction steps, and the flaw carries a CVSS 3.1 score of 9.8 (critical).
What to do: No patched version is identified in the advisory, so monitor the lmdeploy repository/PyPI for a fix and upgrade as soon as one is released; the maintainer-suggested mitigations are replacing pickle with a safer serializer (e.g., msgpack or safetensors) or restricting deserialization via an Unpickler.find_class allowlist, plus enabling RPC authentication. In the meantime, bind the RPC server to localhost or a trusted, firewalled cluster network only, and audit hosts for lmdeploy RPC processes listening on non-local ports.
| InternLM (OpenMMLab / Shanghai AI Laboratory) LMdeploy (pip package 'lmdeploy'), AsyncRPCServer component in zmq_rpc.py | — |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
LMDeploy is a toolkit for compressing, deploying, and serving large language models. Starting in version 0.9.1 and prior to version 0.10.2, the LMdeploy implements an rpc server (AsyncRPCServer in zmq_rpc.py) for supporting the RPC communications. In its core functionality call_and_response(), I found it will directly use the pickles.loads() to deserialize the received messages without any sanitization, hence resulting in a remote code execution vulnerability by this RPC server. Version 0.10.2 contains a patch.
- Ecosystems
- pip
- Weakness
- CWE-502
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- GHSA
- GHSA-5h8j-6crg-7rmw (critical)
In the news0 stories
No ingested article mentions this CVE yet.