SGLang Replay Request Dump Insecure Pickle Deserialization Vulnerability Allowing Remote Code Execution

Vulnerability

A vulnerability exists in the SGLang framework's `replay_request_dump.py` script, which improperly uses `pickle.load()` to deserialize data without validation. This flaw allows an attacker to craft a malicious `.pkl` file that, when loaded by the script, executes arbitrary code on the host machine. The issue arises from the inherent risks of Python's pickle module, which can be exploited to run unauthorized commands by manipulating the deserialization process.

Impact

Exploitation of this vulnerability leads to unauthorized remote code execution on the device running the affected script.

Reproduction

To reproduce this vulnerability, an attacker must create a malicious `.pkl` file containing a payload that, when deserialized, executes code of the attacker's choosing. This file can be placed in a directory where the SGLang application will read it, such as a crash dump folder. Once the file is in place, the operator can run the `replay_request_dump.py` script, which will load the malicious pickle file and execute the embedded code.

Remediation

Users are advised not to run `replay_request_dump.py` on `.pkl` files from untrusted sources or shared directories with weak permissions.

Added: Mar 12, 2026, 12:20 PM
Updated: Mar 12, 2026, 12:20 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
7.5
exploitability
6.6
remediation
0.0
relevance
3.8
threat
4.8
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.