CVE-2026-3989: SGLangs `replay_request_dump.py` contains an insecure pickle.load() without validation and proper deserialization
SGLang's scripts/playground/replay_request_dump.py calls pickle.load() on a request dump file with no validation. If you run the script on a malicious .pkl file, the attacker's code runs on your machine. The data lists sglang 0.5.9 and earlier as affected and 0.5.10 as patched; the fix swaps in a restricted unpickler.
Published Mar 12, 2026 · Updated Apr 7, 2026 · Analysis Oct 31, 2026
What an attacker can do
The script replays recorded requests from a .pkl dump. Python's pickle format can run arbitrary code while loading, so loading a crafted file executes whatever the file's author put in it (CWE-502). The CVSS vector is local with user interaction: someone must run the script against the file.
The realistic route is a dump file that reaches a developer or operator from outside: a bug report attachment, a shared benchmark, a download from a forum or a file from another team. Running the replay script on it gives the attacker code execution as that user, with access to model weights, API keys, SSH keys and cloud credentials on GPU hosts. The script lives in the playground folder rather than the serving path, so a normal SGLang server is not exposed through it. The risk is in people who use the replay tool.
Who is affected
The pip package sglang at 0.5.9 and earlier, per the advisory data. The vulnerable code is the pickle.load call in scripts/playground/replay_request_dump.py, which is in the source repository. Check whether your environment or checkout has that script and who uses it.
pip show sglangIf you cloned the repository, read the script and look for pickle.load.
sglang
- Ecosystem
- PyPI
- Affected
- <= 0.5.9
- Fixed in
- 0.5.10
- Check
pip show sglang
How to fix it
The advisory data names 0.5.10 as the patched release.
pip install --upgrade "sglang>=0.5.10"The fix (pull request 20904) replaces the unsafe pickle.load in the script with safe_pickle_load, a wrapper around a SafeUnpickler class. Reviewers on that pull request noted that SafeUnpickler can be bypassed, so treat it as a limited mitigation. An Orca Security write-up says it found no fix for this script at the time it was published, so do not rely on the patch alone. Never replay a dump file from a source you do not trust, and review the file's origin first.
How to tell if you were hit
Look at shell history and logs on hosts that run SGLang tooling for runs of replay_request_dump.py, and note which .pkl file each run loaded and where it came from. Look for unexpected child processes, outbound connections or new files created around those runs. Orca reports no exploitation seen in the wild at publication. Beam records agent shell commands and file access, which would show an AI agent running the replay script on a downloaded .pkl file.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
SGLangs replay_request_dump.py contains an insecure pickle.load() without validation and proper deserialization. An attacker can take advantage of this by providing a malicious .pkl file, which will execute the attackers code on the device running the script.
Questions
- Is a running SGLang server vulnerable through this CVE?
The flaw is in the replay script in the playground folder, which loads a dump file when someone runs it. It is a local, user-interaction issue, not a network service bug.
- Is CVE-2026-3989 exploited in the wild?
Orca Security says no exploitation was observed at the time of its publication, and the entry has no KEV data. It reports that CERT/CC developed a proof-of-concept.
- Does 0.5.10 fully fix it?
The data lists 0.5.10 as patched. The fix uses a restricted unpickler, and reviewers said such unpicklers can be bypassed. Avoid loading untrusted pickle files regardless.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More SGLang vulnerabilities
All SGLang entriesCVE-2026-10775
SGLang is Vulnerable to DoS via the data_hash Function
low3.6No fixJun 4, 2026CVE-2026-10300
SGLang: Reachable Assertion via lora_path in LoRAManager enables remote Denial of Dervice
low3.7No fixJun 2, 2026CVE-2026-7301
SGLanG: Multimodal scheduler deserializes untrusted pickle data on 0.0.0.0 ROUTER socket
critical9.8No fixMay 18, 2026CVE-2026-7302
SGLang's multimodal generation runtime has an unauthenticated path traversal vulnerability
critical9.1No fixMay 18, 2026CVE-2026-7304
SGLang: Unauthenticated RCE via --enable-custom-logit-processor
critical9.8No fixMay 18, 2026CVE-2026-7669
SGLang has an Improper Input Validation/Injection Issue
medium5.6No fixMay 3, 2026
