sglang is vulnerable to Deserialization of Untrusted Data
98
CVE Score
Critical
Deserialization of Untrusted Data
The /update_weights_from_tensor HTTP endpoint deserializes a base64-encoded pickle payload through the SafeUnpickler class in python/sglang/srt/utils/common.py. SafeUnpickler allowlists the entire builtins module prefix and its denylist omits __import__ and getattr, so a crafted payload chains builtins.__import__ and builtins.getattr inside a pickle REDUCE operation to resolve os.system and run arbitrary commands. The endpoint is marked AuthLevel.ADMIN_OPTIONAL, so it accepts unauthenticated requests whenever the server runs without a configured API key.
Upgrade the sglang library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and the server is deployed without an API key so the /update_weights_from_tensor endpoint accepts unauthenticated requests.
0.1.3 - 0.5.19
Fixed in 0.5.20sglang is vulnerable to Deserialization of Untrusted Data in versions 0.1.3 - 0.5.19.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.