Summary
LightLLM's Config Server unsafely deserializes data received through an unauthenticated WebSocket endpoint. An attacker who can reach the Config Server port may execute arbitrary code with the privileges of the server process.
Affected context
The vulnerability occurs in LightLLM deployments using the Config Server through version 1.2.0, where the unauthenticated /visual_register WebSocket endpoint processes the first client frame as a serialized Python object. Risk is highest when the Config Server port is reachable by untrusted or insufficiently restricted networks.
Exploit preconditions
- Attack surface: The Config Server's /visual_register WebSocket endpoint - Required access: Network connectivity to the Config Server port; endpoint
authentication is not required
- Trigger point: Processing of the first client WebSocket frame - Why exploitation is possible: The received data is passed to an unsafe
deserialization routine that can reconstruct attacker-controlled objects
and invoke their associated behavior
Why this happens
The underlying bug is the use of pickle.loads() on data received from an unauthenticated client. Python pickle deserialization is not a data-only parsing mechanism: reconstructing objects can invoke attacker-influenced behavior. This maps to CWE-502, Unsafe Deserialization, because untrusted serialized input is treated as trusted executable object data.
Potential impact
- An attacker may execute arbitrary code in the Config Server process.
- The attacker could access or alter data available to that process.
- The service may be used to affect connected workers or other internal systems.
- Compromise could enable persistence, lateral movement, or service disruption.
General mitigation guidance
Mitigation generally centers on removing unsafe deserialization from unauthenticated data paths. Secure-by-default designs can use a restricted, data-only serialization format with explicit schemas and validation, while treating all network-supplied frames as untrusted. Access to the Config Server should be limited to trusted clients through authentication, authorization, network segmentation, and narrowly scoped exposure. Running the service with least privilege, restricted filesystem and network permissions, and isolated credentials can reduce the consequences of a compromise.
How teams detect issues like this
Detection can include static analysis for pickle.loads(), related pickle APIs, and deserialization of network-controlled data. Code review should examine unauthenticated WebSocket handlers, dynamic object reconstruction, and validation performed after deserialization. Runtime monitoring can flag unexpected connections to the Config Server, anomalous WebSocket traffic, child-process creation, and behavior inconsistent with the service role. CI and security policy checks may enforce approved data-only serialization formats and prohibit unsafe deserialization in network-facing components.

