sglang is vulnerable to Deserialization of Untrusted Data
98
Critical Risk
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.
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.
sglang is vulnerable to Deserialization of Untrusted Data in versions 0.1.3 - 0.5.19.
Upgrade the sglang library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

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.