Sceawere
Vulnerability Detail
CVE-2026-76850UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV
LMDeploy Insecure Deserialization Vulnerability
Vulnerability Metadata
- Severity
- Critical
- Score / CVSS
- 9.8
- Creation Date
- 19h ago
- Vendor
- InternLM
- Product
- lmdeploy
- Attack Type
- Deserialization of Untrusted Data
- Vector String
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack Complexity
- LOW
Narrative and Response
Description
LMDeploy deserializes disaggregated-serving peer messages with pickle. The handle_zmq_recv coroutine in lmdeploy/pytorch/disagg/conn/engine_conn.py reads peer-to-peer cache-free requests with recv_pyobj(), which deserializes the received bytes with pickle.loads(), and the isinstance check against DistServeCacheFreeRequest runs only after deserialization has already completed. The peer that supplies those bytes is caller-controlled: p2p_connect passes remote_engine_endpoint_info.zmq_address from the request body to connect() on the ZMQ PULL socket, and the POST /distserve/p2p_initialize and /distserve/p2p_connect endpoints in lmdeploy/serve/openai/api_server.py apply no authentication unless the server is started with api_keys, which defaults to None. A remote attacker can direct an engine to pull from a ZMQ endpoint under their control and execute arbitrary code in the engine process. Deployments that do not enable disaggregated serving are not affected, because the receive loop is only started once the migration backend accepts the connection.
Executive Summary
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Technical Details
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Mitigations
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
References
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Additional Metadata
{
"score": "9.8",
"pubDate": "2026-08-19T22:17:28.123Z",
"pubdate": "2026-08-19T22:17:28.123Z",
"executiveSummary": "LMDeploy contains an insecure deserialization vulnerability within its disaggregated-serving peer messaging implementation, specifically in the handle_zmq_recv coroutine located in lmdeploy/pytorch/disagg/conn/engine_conn.py.\nThe vulnerability arises from the use of the Python pickle module via recv_pyobj() to process peer-to-peer cache-free requests from caller-controlled remote endpoints before performing any type validation.\nUnauthenticated API endpoints, namely POST /distserve/p2p_initialize and /distserve/p2p_connect in lmdeploy/serve/openai/api_server.py, allow attackers to supply arbitrary ZMQ addresses via remote_engine_endpoint_info.zmq_address when api_keys are not explicitly configured.\nSuccessful exploitation allows a remote attacker to direct an engine instance to pull malicious payloads from a controlled ZeroMQ endpoint and execute arbitrary code with the privileges of the engine process.\nDeployments that do not explicitly enable disaggregated serving or that properly enforce API key authentication mitigate this risk, whereas default configurations lacking API keys remain exposed to unauthenticated remote attackers.",
"technicalDetails": "The vulnerability stems from unsafe object deserialization handled by the ZeroMQ communication layer within LMDeploy's disaggregated serving architecture.\nThe vulnerable component is the handle_zmq_recv coroutine situated in lmdeploy/pytorch/disagg/conn/engine_conn.py, which processes incoming peer-to-peer cache-free requests.\nSpecifically, the method invokes recv_pyobj(), a wrapper that executes pickle.loads() on incoming byte streams received over a ZeroMQ PULL socket.\nThe type safety check verifying whether the deserialized object is an instance of DistServeCacheFreeRequest occurs strictly after the unpickling process completes, failing to prevent the execution of arbitrary Python object instantiation sequences contained within the malicious payload.\nThe attack vector is facilitated by the POST /distserve/p2p_initialize and /distserve/p2p_connect endpoints in lmdeploy/serve/openai/api_server.py.\nThese endpoints accept caller-controlled input containing remote_engine_endpoint_info.zmq_address, which is subsequently passed directly to the connect() method of the ZeroMQ socket via p2p_connect without validation.\nBy default, api_keys are set to None, meaning these HTTP endpoints lack authentication and are exposed to network-based attackers.\nThe attack flow proceeds as follows: First, an unauthenticated attacker sends a crafted HTTP request to the /distserve/p2p_connect or /distserve/p2p_initialize endpoints, supplying a malicious ZeroMQ endpoint address under their control.\nSecond, the engine binds or connects its ZMQ PULL socket to the attacker-controlled address.\nThird, the attacker transmits serialized malicious pickle payloads across the ZMQ channel.\nFourth, the engine invokes recv_pyobj(), executing pickle.loads() on the arbitrary bytes, which immediately triggers remote code execution via Python's reduce protocol during the deserialization phase.\nFinally, arbitrary code executes within the context of the running engine process, achieving full system or container compromise depending on the deployment constraints."
}