CVE-2026-3989: SGLangs Insecure Pickle Load Vulnerability in replay_request_dump.py
Summary
CVE-2026-3989: SGLangs replay_request_dump.py contains an insecure pickle.load() without validation and proper deserialization. Affects sglang versions < 0.5.9. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
SGLangs is a Python package available on PyPI that provides functionalities for handling and processing various programming languages. One of its components, replay_request_dump.py, is designed to replay request dumps for testing and debugging purposes. However, this component is vulnerable to security risks due to its use of insecure deserialization methods, specifically the pickle.load() function, which can lead to code execution vulnerabilities.
Vulnerability Detail
The vulnerability arises from the use of the pickle.load() function in SGLangs' replay_request_dump.py without proper validation and deserialization checks. An attacker can exploit this vulnerability by crafting a malicious .pkl file that, when loaded by the script, executes arbitrary code on the host machine. This poses significant risks, including unauthorized access to sensitive data, system compromise, and potential data loss. The vulnerability is classified under CWE-502, which pertains to deserialization of untrusted data.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, avoid using the replay_request_dump.py script until the package is updated. If you must use it, ensure that any .pkl files you load are from trusted sources only. Additionally, consider replacing the use of pickle with safer serialization formats such as JSON or YAML, which do not execute code during deserialization.
Conclusion
The SGLangs package contains a significant vulnerability in its replay_request_dump.py script due to insecure deserialization practices. It is crucial for users to update to the latest version to mitigate risks associated with this vulnerability. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.
See every vulnerability recorded for sglang →
FAQ
The vulnerability is an insecure deserialization issue caused by the use of pickle.load() without validation, allowing attackers to execute arbitrary code.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
The CVSS score of this vulnerability is 7.8, indicating a high severity level.
If you cannot update the package, avoid using the vulnerable script and ensure that any .pkl files loaded are from trusted sources.
Exploiting this vulnerability can lead to unauthorized access, system compromise, and potential data loss.
Related vulnerabilities
Recent vulnerabilities recorded for sglang.