SAPinsider

articles

Pickle in the Pipeline: Critical RCE Vulnerabilities in SGLang’s LLM Serving Framework

Pickle in the Pipeline: Critical RCE Vulnerabilities in SGLang’s LLM Serving Framework

The Orca Security Research Pod continuously investigates the security posture of widely adopted AI/ML infrastructure. During a focused audit of LLM serving frameworks, I discovered multiple unsafe deserialization vulnerabilities in SGLang, a popular open-source framework for serving large language models and multimodal AI models. These findings were coordinated through CERT/CC (case VU#665416), with additional analysis contributed by CERT/CC vulnerability researcher Christopher Cullen.

Three CVEs have been assigned: CVE-2026-3059, CVE-2026-3060, and CVE-2026-3989. The first two allow unauthenticated remote code execution against any SGLang deployment that exposes its multimodal generation or disaggregation features to the network. The third involves insecure deserialization in a crash dump replay utility. At the time of publication, the SGLang maintainers have not responded to coordinated disclosure efforts, and no official patch is available.

Quick Overview

Attribute CVE-2026-3059 CVE-2026-3060 CVE-2026-3989
Component Multimodal generation ZMQ broker (scheduler_client.py) Disaggregation encoder receiver (encode_receiver.py) Crash dump replay script (replay_request_dump.py)
CWE CWE-502 (Deserialization of Untrusted Data) CWE-502 (Deserialization of Untrusted Data) CWE-502 (Deserialization of Untrusted Data)
CVSS 3.1 9.8 Critical 9.8 Critical 7.8 High
CVSS Vector AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Attack Vector Network Network Local
Authentication None None None
User Interaction None None Required
Affected Versions ≥ 0.5.5 through latest (0.5.9 at time of publication) All versions with disaggregation module All versions containing replay_request_dump.py
Fix Available No No No

CVSS Rationale

CVE-2026-3059 and CVE-2026-3060 score 9.8 because the ZMQ broker binds to all available network interfaces (tcp://*) by default with zero authentication, and the pickle.loads() call executes immediately on any received payload. An attacker with network access to the exposed port needs nothing else – no credentials, no user interaction, no complex race conditions. The result is full code execution in the context of the SGLang process. This is a textbook unauthenticated network RCE.

Note: The 9.8 base score reflects severity when the affected feature is active. The multimodal generation and disaggregation modules must be explicitly enabled; default text-only SGLang deployments do not expose the vulnerable broker.

CVE-2026-3989 scores 7.8 High (AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H). While the impact upon execution is the same as the network RCEs – full arbitrary code execution – the attack prerequisites are meaningfully different. This is a debugging utility in a scripts/playground/ directory; exploitation requires an attacker to plant a malicious .pkl file where an operator will manually load it, via write access to a crash dump directory or social engineering. It underscores the systemic nature of unsafe pickle usage throughout the SGLang codebase.

What Is SGLang?

SGLang is an open-source serving framework developed by LMSYS for running large language models and multimodal AI models in production. It supports a wide range of popular models – including Qwen, DeepSeek, Mistral, and Skywork – and provides OpenAI-compatible API endpoints. SGLang is designed for high-throughput, low-latency inference and is used across research labs and production deployments. In most production environments, SGLang runs inside containerized GPU inference infrastructure – Kubernetes pods, Docker containers, or dedicated GPU nodes. Compromising an SGLang instance could expose model weights, inference data, API credentials, GPU workloads, and potentially provide a pivot point into the surrounding cluster environment.

Technical Analysis

Root Cause: Python’s pickle on Untrusted Network Data

All three vulnerabilities share a single root cause: the use of Python’s pickle module to deserialize data from untrusted sources.

Python’s own documentation explicitly warns that the pickle module is not secure and should never be used to deserialize untrusted data. The reason is fundamental to how pickle works – a pickle stream doesn’t just encode data, it encodes instructions for reconstructing Python objects. An attacker can craft a pickle payload whose reconstruction instructions include arbitrary function calls, achieving full code execution the moment pickle.loads() runs.

This is not a novel class of vulnerability. The same pattern has led to RCE in other ML serving frameworks, notably CVE-2024-9053 in vLLM and CVE-2025-10164 in a previous SGLang component. The persistence of pickle-based deserialization in ML tooling is a systemic problem, and SGLang’s codebase contains over 20 instances of pickle.loads() across different modules.

How Pickle Deserialization Becomes Code Execution

Vendors mentioned

Fill in the form on this page to read the full article.