CVE-2025-10164: SGLang Remote Code Execution Vulnerability via Unsafe Deserialization in update_weights_from_tensor
SGLang up to 0.5.3 unpickles the serialized_named_tensors argument of its /update_weights_from_tensor endpoint, so a network caller can run code on the model server. A public exploit exists. The fix in 0.5.4 swaps the plain pickle loader for a restricted one. Upgrade to sglang 0.5.4 and keep the endpoint off untrusted networks.
Published Sep 9, 2025 · Updated Oct 29, 2025 · Analysis Nov 1, 2026
What an attacker can do
The /update_weights_from_tensor endpoint receives serialized_named_tensors and passes it to a deserialize function that called ForkingPickler.loads on the bytes. Pickle can call arbitrary Python callables while loading, so a crafted payload can run os.system, subprocess or eval in the SGLang server process.
An attacker who can send requests to the SGLang HTTP port needs no credentials. The advisory text says the exploit has been released publicly, and that the vendor was contacted early and did not respond. The CVSS 3.1 vector rates it network, low complexity and no privileges.
A compromised inference server gives the attacker the GPU host: model weights, API keys and cloud credentials in the environment, other tenants prompts, and a base for lateral movement. The CVSS impact scores are listed as low, which understates what code execution in the process provides. Servers that expose the SGLang port beyond localhost, or share a flat network with it, are the main exposure.
Who is affected
Affected: sglang up to and including 0.5.3 (the report names lmsys sglang 0.4.6 as the version first examined). The weakness sits in the HTTP server path, so it matters when the server listens on a reachable address. Check the installed version:
pip show sglangAlso check container images that bundle sglang, and the host and port the launch command binds to.
sglang
- Ecosystem
- PyPI
- Affected
- <= 0.5.3
- Fixed in
- 0.5.4
- Check
pip show sglang
How to fix it
Upgrade to sglang 0.5.4.
pip install --upgrade sglang==0.5.4The fix commit changes the deserialize function in python/sglang/srt/utils/common.py. It uses a SafeUnpickler that blocks callables such as builtins.eval, builtins.exec, os.system and subprocess.Popen, and only allows modules with prefixes such as builtins., collections., torch., transformers. and sglang.srt.utils. A blocked load raises a RuntimeError that cites CVE-2025-10164. The sources give no other workaround. Until you upgrade, bind the server to localhost or a private interface and firewall it.
How to tell if you were hit
Search access logs for requests to /update_weights_from_tensor from hosts other than your trainer or orchestrator. After the fix, a blocked payload raises a RuntimeError that mentions CVE-2025-10164, which is a useful log line to alert on. Look for child processes of the SGLang server such as sh, curl or nc, unexpected outbound connections from the GPU host, and new files in temp directories. Beam records agent shell commands, but this server flaw is outside agent activity, so rely on host and network logs.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
A security flaw has been discovered in lmsys sglang 0.4.6. Affected by this vulnerability is the function main of the file /update_weights_from_tensor. The manipulation of the argument serialized_named_tensors results in deserialization. The attack can be launched remotely. The exploit has been released to the public and may be exploited. The vendor was contacted early about this disclosure but did not respond in any way.
Credited to m1ssya.
Questions
- Is there a public exploit?
Yes. The advisory text states that the exploit has been released to the public. It is not in CISA KEV, and no source here reports exploitation in the wild.
- Which SGLang version fixes CVE-2025-10164?
0.5.4. The advisory range is up to and including 0.5.3.
- Why is the score only Medium if it allows code execution?
The listed CVSS impact values are low. The weakness is unsafe pickle deserialization, which in practice allows code execution, so treat exposed servers as high risk.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More SGLang vulnerabilities
All SGLang entriesCVE-2026-10775
SGLang is Vulnerable to DoS via the data_hash Function
low3.6No fixJun 4, 2026CVE-2026-10300
SGLang: Reachable Assertion via lora_path in LoRAManager enables remote Denial of Dervice
low3.7No fixJun 2, 2026CVE-2026-7301
SGLanG: Multimodal scheduler deserializes untrusted pickle data on 0.0.0.0 ROUTER socket
critical9.8No fixMay 18, 2026CVE-2026-7302
SGLang's multimodal generation runtime has an unauthenticated path traversal vulnerability
critical9.1No fixMay 18, 2026CVE-2026-7304
SGLang: Unauthenticated RCE via --enable-custom-logit-processor
critical9.8No fixMay 18, 2026CVE-2026-7669
SGLang has an Improper Input Validation/Injection Issue
medium5.6No fixMay 3, 2026
