Summary
SGLang's expert-parallel backup subsystem exposes a ZeroMQ PULL socket that accepts pickled data without authentication or validation.
When this feature is enabled and reachable over the network, an attacker can send a malicious pickle payload that leads to unauthenticated remote code execution on the affected service.
Affected context
The vulnerability arises in SGLang deployments that enable the expert-parallel backup subsystem and bind its ZeroMQ PULL socket to a routable network interface.
In this context, the backup component receives serialized Python objects via the network and directly unpickles them without enforcing authentication, authorization, or deserialization safety checks.
Environments where this socket is exposed beyond a tightly controlled internal network, or where network boundaries are porous, are particularly susceptible to exploitation.
Exploit preconditions
- Attack surface: Network-exposed ZeroMQ PULL socket used by the expert-parallel backup subsystem.
- Required access: Ability to send network traffic to the listening ZeroMQ endpoint (no credentials or prior trust required).
- Trigger point: Backup or restore operations that cause the service to receive and unpickle incoming data on the backup socket.
- Why exploitation is possible: The service uses Python's pickle deserialization (or an equivalent mechanism) on untrusted data without authentication, integrity checks, or type/operation restrictions, allowing attacker-controlled objects to be instantiated and executed.
Why this happens
This issue stems from trusting serialized data received over the network and processing it with a general-purpose deserialization mechanism (pickle) that can execute arbitrary code during object reconstruction.
Under CWE-502 (Unsafe Deserialization), the core problem is treating external, attacker-controlled byte streams as if they were inherently trustworthy, without establishing authenticity or restricting what object types and behaviors are allowed.
In SGLang's backup subsystem, the ZeroMQ PULL socket acts as an unauthenticated ingress, and the deserializer is invoked directly on its input, creating a direct path from network data to code execution.
Potential impact
- Unauthenticated attackers could execute arbitrary code in the context of the SGLang service process.
- Attackers may read, modify, or destroy data processed by the affected deployment.
- Compromise of the host running SGLang, potentially enabling lateral movement within the surrounding infrastructure.
- Disruption of AI workloads, tampering with model outputs, or sabotaging backup and recovery processes.
General mitigation guidance
Effective mitigation focuses on treating deserialization as a privileged operation and minimizing trust in network-delivered data.
Common patterns include:
- Avoiding pickle or other code-executing deserialization formats for data exchanged over the network; prefer data-only formats such as JSON, MessagePack, or protocol buffers.
- Introducing strong authentication and authorization in front of any backup or control sockets, so only trusted components can connect.
- Applying integrity and schema validation to all serialized payloads before processing, including explicit whitelists for allowed structures.
- Isolating backup functionality on non-routable interfaces or within dedicated, access-controlled network segments.
- Running the backup subsystem with least-privilege OS accounts and process-level sandboxing to limit blast radius if deserialization is abused.
How teams detect issues like this
Organizations can identify and monitor this class of vulnerability using:
- Static analysis rules that flag use of unsafe deserialization APIs (e.g.,
pickle.load,pickle.loads) on data sourced from sockets, IPC, or other untrusted channels. - Code review checklists that specifically examine backup, clustering, and control-plane components for unauthenticated network endpoints and dynamic object loading.
- Configuration and infrastructure-as-code reviews to ensure internal service sockets are bound to non-routable interfaces and protected by network access controls.
- Runtime monitoring that alerts on anomalous connections to the backup subsystem or unusual child processes, file access, or system calls originating from the SGLang service.

