PyPI: sglang

CVE-2025-10164

Safety vulnerability ID: SFTY-20250909-95616

Safety legacy ID: pyup.io-81122

Affected versions of the sglang package are vulnerable to Deserialization of Untrusted Data due to unsafe deserialization of the user-controlled serialized_named_tensors argument in the update_weights_from_tensor main routine. The /update_weights_from_tensor main function accepts a serialized_named_tensors payload and deserialises it without validation or sandboxing, allowing attacker-supplied objects to be instantiated during the weight-update path.

Created at: Nov 5, 2025Updated at: Nov 5, 2025

Overview

SGLang Remote Code Execution Vulnerability via Unsafe Deserialization in update_weights_from_tensor

Advisory

Affected versions of the sglang package are vulnerable to Deserialization of Untrusted Data due to unsafe deserialization of the user-controlled serialized_named_tensors argument in the update_weights_from_tensor main routine. The /update_weights_from_tensor main function accepts a serialized_named_tensors payload and deserialises it without validation or sandboxing, allowing attacker-supplied objects to be instantiated during the weight-update path.

Affected Package

Affecting sglang package, versions
<0.5.4

Also affects

---

How to Fix

Upgrade
sglang
to
0.5.4
or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more