/

CVE-2026-76850

Severity:

CRITICAL RISK

(9.8)

Unsafe Deserialization (CWE-502) in LMDeploy Serving

CVE-2026-76850

Deferred

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

LMDeploy uses Python pickle deserialization for peer messages in its disaggregated-serving engine connection path. When unauthenticated or insufficiently protected endpoints allow an attacker to control the peer endpoint, the engine may execute arbitrary code during message deserialization.

Affected context

The issue occurs in LMDeploy deployments using disaggregated serving, where engine processes receive cache-free peer requests through a ZeroMQ connection. Risk is higher when the HTTP initialization and connection endpoints are exposed without API-key authentication and accept caller-controlled peer endpoint information. Deployments that do not start the disaggregated-serving receive loop may not reach the affected deserialization path.

Exploit preconditions

  • Attack surface: HTTP disaggregated-serving initialization and connection endpoints, followed by the engine's peer-to-peer ZeroMQ receive channel
  • Required access: Ability to invoke the relevant API endpoints and influence the remote engine endpoint information; authentication may be absent when API keys are not configured
  • Trigger point: Receipt of a peer message by the handle_zmq_recv coroutine through recv_pyobj()
  • Why exploitation is possible: Pickle deserialization processes the received object before the subsequent type check, allowing attacker-controlled serialized data to execute within the engine process

Why this happens

The vulnerability results from treating peer-supplied bytes as trusted Python objects and deserializing them with pickle.loads() through recv_pyobj(). Python pickle can invoke constructors and other object behaviors during loading, so an isinstance check performed afterward cannot prevent execution. This is CWE-502: Deserialization of Untrusted Data, because validation occurs only after a potentially dangerous deserialization operation.

Potential impact

  • An attacker may execute arbitrary code in the LMDeploy engine process
  • The serving workload could be compromised or disrupted
  • Sensitive model, request, or infrastructure data could be accessed
  • The compromised process could be used for lateral movement, depending on its permissions and network reachability
  • Model-serving integrity could be affected through tampering or data poisoning

General mitigation guidance

Mitigation generally centers on removing executable deserialization from peer communication and reducing trust in connection metadata.

Common defensive patterns include:

  • Replacing pickle-based transport with a data-only serialization format that has an explicit schema
  • Validating message structure and types before converting data into application objects
  • Authenticating and authorizing all disaggregated-serving initialization and connection requests
  • Restricting which peer addresses and ZeroMQ endpoints an engine may contact
  • Keeping management APIs on isolated networks and denying untrusted inbound access
  • Running engine processes with least privilege and limiting filesystem, network, and host access
  • Using cryptographic integrity protection for peer messages where appropriate
  • Disabling unused disaggregated-serving features to reduce the exposed attack surface

How teams detect issues like this

Detection approaches may include:

  • Static analysis rules identifying pickle.loads, recv_pyobj(), and equivalent deserialization of network-provided data
  • Code review checks for type validation that occurs after object deserialization
  • API security reviews for unauthenticated peer-initialization and connection endpoints
  • Runtime monitoring for unexpected ZeroMQ connections, endpoint changes, or unusual child-process and system activity
  • Network policy checks ensuring engines can connect only to approved peer addresses
  • CI policy enforcement that blocks unsafe serialization APIs in network-facing code

Automated code review and software composition tools may help identify related unsafe-deserialization patterns.

Sources

SourceLink
github.comgithub.com/InternLM/lmdeploy
github.comgithub.com/InternLM/lmdeploy/blob/v0.15.0/lmdeploy/pytorch/disagg/conn/engine_conn.py#L61
github.comgithub.com/InternLM/lmdeploy/blob/v0.15.0/lmdeploy/pytorch/disagg/conn/engine_conn.py#L79
github.comgithub.com/InternLM/lmdeploy/commit/f05b4ad8bf2e2d84101a1d63b3c44fadd99223b2
github.comgithub.com/InternLM/lmdeploy/issues/4804
github.comgithub.com/InternLM/lmdeploy/releases/tag/v0.16.0
vulncheck.comvulncheck.com/advisories/lmdeploy-remote-code-execution-via-unsafe-pickle-deserialization-in-the-disaggregated-serving-peer-connector

Frequently asked

questions

It can be remotely exploitable when an attacker can reach the relevant LMDeploy HTTP endpoints, influence the peer endpoint information, and the deployment permits the engine to connect to an attacker-controlled ZeroMQ endpoint.

Yes. Deployments that do not configure API-key authentication may expose the initialization and connection operations to unauthenticated callers. Network isolation and endpoint allowlisting also affect practical exploitability.

Avoid executable object deserialization for peer messages. Use a schema-bound, data-only format with authentication, integrity checks, and validation before application processing.

Treat all network-supplied serialized data as untrusted, prohibit unsafe deserialization APIs in policy and code review, authenticate management endpoints, restrict peer connectivity, and run serving components with minimal privileges.

Find out what's already
exploitable in your codebase.