Severity:

CRITICAL RISK

(9.8)

Unsafe Deserialization in SGLang Encoder Parallel

CVE-2026-3060

Modified

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

SGLang's encoder parallel disaggregation system contains an unsafe deserialization flaw where the disaggregation module uses pickle.loads() on untrusted data without any authentication.

An attacker who can reach this interface over the network can send crafted payloads that may achieve unauthenticated remote code execution in the SGLang process.

Affected context

The vulnerability resides in the encoder parallel disaggregation module of SGLang, which accepts serialized input for distributed or parallel processing of encoder workloads.

In affected deployments, this component deserializes incoming data using Python's pickle.loads() without verifying the sender's identity or enforcing message integrity.

Any environment where this disaggregation endpoint is reachable from untrusted or partially trusted networks, including shared internal networks, may be exposed to exploitation.

Exploit preconditions

  • Attack surface: Network-accessible disaggregation interface used by SGLang's encoder parallel system.
  • Required access: Ability to send arbitrary data to the disaggregation module; no prior authentication or valid session is required if the service is reachable.
  • Trigger point: Submission of a crafted serialized payload that the disaggregation module processes via pickle.loads().
  • Why exploitation is possible: Python's pickle mechanism can execute arbitrary code during deserialization, and the module treats all incoming serialized data as trusted without authentication or content restrictions.

Why this happens

This issue stems from using Python's pickle deserialization (pickle.loads()) on data that can be influenced by external clients without applying authentication, authorization, or strict validation.

Pickle is designed for trusted, in-process object serialization and explicitly allows arbitrary code execution during object reconstruction, making it unsafe for untrusted data.

Conceptually, this aligns with CWE-502: Deserialization of Untrusted Data, where the application rehydrates complex objects from external input, inadvertently granting attackers a path to run arbitrary behavior on the server.

Potential impact

  • Remote execution of arbitrary code in the context of the SGLang encoder disaggregation process.
  • Full compromise of the host running the vulnerable SGLang component, depending on process privileges and containment.
  • Manipulation or exfiltration of model inputs, intermediate representations, or responses handled by the encoder pipeline.
  • Use of the compromised service as a foothold for lateral movement within the surrounding infrastructure.
  • Denial of service through crafted payloads that crash or hang the deserialization logic.

General mitigation guidance

Mitigation typically focuses on removing unsafe deserialization paths and reducing implicit trust in serialized data.

Pattern-based defensive strategies include:

  • Avoiding pickle and similar code-executing serializers for data received over networks; favor formats like JSON, MessagePack, or other data-only encodings with strict schema enforcement.
  • Introducing an explicit trust boundary for disaggregation traffic, such as mutual authentication between nodes and transport-level protection so only authorized peers can send data.
  • Applying strict message validation, schema checking, and type whitelisting before any reconstruction of complex objects.
  • Running the disaggregation logic with least-privilege execution, isolating it via containers, sandboxes, or dedicated accounts to limit impact if deserialization is abused.
  • Designing the architecture so cross-node communication uses constrained, well-typed messages rather than arbitrary serialized Python objects.

How teams detect issues like this

Effective detection generally combines code-level inspection with runtime monitoring:

  • Static analysis rules and manual code review to flag uses of pickle.loads() (and similar APIs) on data that can originate from network or other untrusted sources.
  • Security-focused code review checklists that require justification or prohibition of general-purpose object deserialization mechanisms in distributed communication paths.
  • Logging and monitoring of disaggregation endpoints for unexpected sources, unusual payload sizes, or anomalous error patterns during deserialization.
  • Periodic dependency and configuration audits to ensure that unsafe serialization patterns are not reintroduced into distributed processing components.

Automated code review and application security tooling can assist by flagging unsafe deserialization calls during continuous integration.

Sources

SourceLink
github.comgithub.com/sgl-project/sglang/blob/main/python/sglang/srt/disaggregation/encode_receiver.py
github.comgithub.com/sgl-project/sglang/pull/20904
github.comgithub.com/sgl-project/sglang/releases/tag/v0.5.10
orca.securityorca.security/resources/blog/sglang-llm-framework-rce-vulnerabilities/

Frequently asked

questions

Yes. If the disaggregation interface is reachable from a network an attacker can access, the flaw can be exploited remotely by sending crafted serialized data.

No inherent authentication is enforced at the vulnerable deserialization point, so exploitation does not require valid credentials when the service is exposed.

The most robust fix is to eliminate the use of pickle (and similar code-executing serializers) for any externally sourced data and replace it with a data-only serialization format combined with strict schema validation and authenticated communication between nodes.

Treat all cross-boundary serialized data as untrusted by default, avoid generic object deserialization in network protocols, enforce strong authentication and authorization for internal services, and institutionalize secure coding guidelines and static checks that flag unsafe deserialization constructs early in development.

Find out what's already
exploitable in your codebase.