/

CVE-2026-119706

Severity:

CRITICAL RISK

(9.8)

Unsafe Deserialization (CWE-502) in LMDeploy API Server

CVE-2026-119706

Deferred

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Unauthenticated 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

InternLM LMDeploy contains an unauthenticated unsafe deserialization vulnerability in the /update_weights endpoint. A remote attacker may submit crafted pickled data that is deserialized without validation, allowing operating system commands to execute with the privileges of the API server process.

InternLM LMDeploy contains an unauthenticated unsafe deserialization vulnerability in the /update_weights endpoint. A remote attacker may submit crafted pickled data that is deserialized without validation, allowing operating system commands to execute with the privileges of the API server process.

Affected context

The vulnerability affects LMDeploy deployments using the API server and exposing the /update_weights endpoint. It becomes risky when the endpoint is reachable by untrusted network clients and accepts serialized tensor data that is processed with ForkingPickler.loads without strict validation or an equivalent trust boundary. The reported affected release range is LMDeploy 0.9.0 through 0.18.0.

The vulnerability affects LMDeploy deployments using the API server and exposing the /update_weights endpoint. It becomes risky when the endpoint is reachable by untrusted network clients and accepts serialized tensor data that is processed with ForkingPickler.loads without strict validation or an equivalent trust boundary. The reported affected release range is LMDeploy 0.9.0 through 0.18.0.

Exploit preconditions

  • Attack surface: Network-accessible /update_weights API endpoint
  • Required access: No authentication is required when the endpoint is exposed without additional access controls
  • Trigger point: Processing the serialized_named_tensors request data
  • Why exploitation is possible: Crafted serialized data reaches an unsafe pickle deserializer, which can reconstruct attacker-controlled objects and trigger command execution
  • Attack surface: Network-accessible /update_weights API endpoint
  • Required access: No authentication is required when the endpoint is exposed without additional access controls
  • Trigger point: Processing the serialized_named_tensors request data
  • Why exploitation is possible: Crafted serialized data reaches an unsafe pickle deserializer, which can reconstruct attacker-controlled objects and trigger command execution

Why this happens

The underlying issue is the use of Python pickle deserialization on attacker-influenced input without authentication, validation, or a restricted data format. Pickle deserialization can invoke object reconstruction behavior rather than merely decode data, allowing serialized content to perform unintended operations during loading. This maps to CWE-502: Deserialization of Untrusted Data.

The underlying issue is the use of Python pickle deserialization on attacker-influenced input without authentication, validation, or a restricted data format. Pickle deserialization can invoke object reconstruction behavior rather than merely decode data, allowing serialized content to perform unintended operations during loading. This maps to CWE-502: Deserialization of Untrusted Data.

Potential impact

  • An attacker may execute arbitrary operating system commands
  • The API server process may be fully compromised
  • Sensitive model files, credentials, or environment data could be exposed
  • The affected host or container may be used for lateral movement
  • Model integrity and inference results could be altered
  • The service may be disrupted or used to affect other workloads
  • An attacker may execute arbitrary operating system commands
  • The API server process may be fully compromised
  • Sensitive model files, credentials, or environment data could be exposed
  • The affected host or container may be used for lateral movement
  • Model integrity and inference results could be altered
  • The service may be disrupted or used to affect other workloads

General mitigation guidance

Mitigation generally focuses on removing unsafe object deserialization from unauthenticated request paths and reducing trust in client-supplied data.

Common defensive patterns include:

  • Replacing pickle-based transport with a non-executable, schema-constrained serialization format
  • Rejecting arbitrary object reconstruction and permitting only explicitly defined primitive data types
  • Requiring authentication and authorization before weight-update operations
  • Restricting the endpoint to trusted management networks or private service interfaces
  • Applying strict request validation, size limits, and content checks before processing tensor data
  • Running the API server with least privilege and isolating it from sensitive host resources
  • Limiting credentials, filesystem access, and network permissions available to the service

Mitigation generally focuses on removing unsafe object deserialization from unauthenticated request paths and reducing trust in client-supplied data.

Common defensive patterns include:

  • Replacing pickle-based transport with a non-executable, schema-constrained serialization format
  • Rejecting arbitrary object reconstruction and permitting only explicitly defined primitive data types
  • Requiring authentication and authorization before weight-update operations
  • Restricting the endpoint to trusted management networks or private service interfaces
  • Applying strict request validation, size limits, and content checks before processing tensor data
  • Running the API server with least privilege and isolating it from sensitive host resources
  • Limiting credentials, filesystem access, and network permissions available to the service

How teams detect issues like this

Organizations can look for:

  • Static-analysis findings involving pickle.loads, ForkingPickler.loads, or equivalent deserialization APIs on request-controlled data
  • Code review paths where serialized request fields reach object loaders without authentication or schema validation
  • API inventories showing publicly reachable model-management or weight-update endpoints
  • Network telemetry for unexpected requests to /update_weights, especially from untrusted sources
  • Process-monitoring alerts for shell or operating-system command execution by the API server
  • Policy checks requiring authentication, authorization, and approved serialization formats for administrative endpoints

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

Organizations can look for:

  • Static-analysis findings involving pickle.loads, ForkingPickler.loads, or equivalent deserialization APIs on request-controlled data
  • Code review paths where serialized request fields reach object loaders without authentication or schema validation
  • API inventories showing publicly reachable model-management or weight-update endpoints
  • Network telemetry for unexpected requests to /update_weights, especially from untrusted sources
  • Process-monitoring alerts for shell or operating-system command execution by the API server
  • Policy checks requiring authentication, authorization, and approved serialization formats for administrative endpoints

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

Sources

SourceLink
github.comgithub.com/InternLM/lmdeploy
github.comgithub.com/InternLM/lmdeploy/blob/v0.18.0/lmdeploy/serve/openai/endpoints/management.py#L55-L60
github.comgithub.com/InternLM/lmdeploy/blob/v0.18.0/lmdeploy/turbomind/turbomind.py#L345
github.comgithub.com/InternLM/lmdeploy/issues/4698
github.comgithub.com/InternLM/lmdeploy/pull/4964
vulncheck.comvulncheck.com/advisories/lmdeploy-0.9.0-through-0.18.0-unauthenticated-rce-via-update-weights-pickle-deserialization

Frequently asked

questions

Yes. When the /update_weights endpoint is network reachable and lacks compensating access controls, a remote attacker may send crafted serialized data without needing local access.

No authentication is required by the vulnerable request path as described. Network reachability to the endpoint is the primary access condition, although deployment-level controls may limit exposure.

Avoid deserializing attacker-controlled pickle data. Use a non-executable, schema-constrained format and enforce authentication, authorization, and validation before processing model updates.

Treat serialized request data as untrusted, prohibit unsafe object loaders in network-facing code, protect administrative endpoints, and run model-serving processes with minimal privileges.

Yes. When the /update_weights endpoint is network reachable and lacks compensating access controls, a remote attacker may send crafted serialized data without needing local access.

No authentication is required by the vulnerable request path as described. Network reachability to the endpoint is the primary access condition, although deployment-level controls may limit exposure.

Avoid deserializing attacker-controlled pickle data. Use a non-executable, schema-constrained format and enforce authentication, authorization, and validation before processing model updates.

Treat serialized request data as untrusted, prohibit unsafe object loaders in network-facing code, protect administrative endpoints, and run model-serving processes with minimal privileges.

Find out what's already
exploitable in your codebase.