/

CVE-2026-86793

Severity:

CRITICAL RISK

(9.8)

Code Injection (CWE-94) in SGLang Weight Update API

CVE-2026-86793

Deferred

Vulnerability type

Category:

Code Injection

CWE:

CWE-94

Impact:

Unauthenticated Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

SGLang contains a critical code-injection vulnerability in the

/update_weights_from_tensor endpoint, where pickle data can be deserialized

without authentication when no authorization keys are configured. A bypass of

the intended SafeUnpickler restrictions may allow an attacker to execute

arbitrary code on the SGLang service host.

Affected context

The vulnerability occurs in SGLang deployments that expose the

/update_weights_from_tensor endpoint and do not configure authentication

keys. Risk is increased when the endpoint is reachable by untrusted clients

and the service processes attacker-controlled serialized weight-update data

before applying effective authorization and deserialization restrictions.

Exploit preconditions

  • Attack surface: Network-accessible SGLang weight-update endpoint
  • Required access: No authentication when authorization keys are absent
  • Trigger point: Processing attacker-controlled data by

/update_weights_from_tensor

  • Why exploitation is possible: Pickle deserialization can invoke

dynamically resolved objects, while the SafeUnpickler policy does not

sufficiently restrict all resolution paths

Why this happens

The underlying issue is the use of pickle deserialization on data that may be

controlled by an unauthenticated remote client. Although SGLang applies a

SafeUnpickler policy, permitted resolution of callable built-in objects such

as import and getattr can undermine the intended restrictions when pickle

reduction behavior is processed. This represents CWE-94, Code Injection,

because attacker-influenced serialized data can cause executable behavior

rather than being treated solely as inert data.

Potential impact

  • An attacker may execute arbitrary code in the SGLang process context.
  • The attacker could access or modify data available to the service account.
  • The affected host or container could be used for lateral movement.
  • Model artifacts, weights, or workloads could be altered or sabotaged.
  • Service availability could be disrupted.

General mitigation guidance

Mitigation generally focuses on eliminating executable deserialization from

network-facing paths and enforcing authentication by default.

Common defensive patterns include:

  • Replacing pickle with a data-only serialization format that does not support

arbitrary object construction.

  • Applying strict, allowlisted schemas and types to weight-update inputs.
  • Enforcing authentication and authorization for every weight-management

operation, including deployments with default or missing configuration.

  • Binding administrative endpoints to restricted networks or control planes.
  • Running the service with least privilege and isolating model-processing

workloads from sensitive host and cluster resources.

  • Treating serialized inputs as untrusted regardless of their apparent origin.

How teams detect issues like this

Detection can include static analysis for pickle loading, custom unpickler

implementations, dynamic import resolution, and callable resolution in

network request handlers. Code review should examine whether administrative

endpoints remain reachable without configured credentials, whether

deserialization occurs before authorization, and whether allowlists can be

bypassed through indirect object resolution. Runtime monitoring can alert on

unexpected access to weight-update endpoints, anomalous child processes, or

outbound connections from inference services. Automated security review tools

and CI policy checks can help identify unsafe deserialization and missing

authentication controls.

Sources

SourceLink
github.comgithub.com/sgl-project/sglang/tree/main
vicone.comvicone.com/blog/cve-2026-86793-sglang-bypass-could-let-attackers-run-code-on-ai-servers/

Frequently asked

questions

It may be remotely exploitable when the weight-update endpoint is network

reachable and authentication keys are not configured. Exposure depends on

deployment network boundaries and endpoint access controls.

Not necessarily. The described condition permits unauthenticated requests when

no authentication keys are configured, although network access to the

endpoint is still required.

Avoid deserializing attacker-controlled pickle data. Prefer a data-only format

with strict schema validation, and require authentication and authorization

before processing any weight-update request.

Keep administrative APIs private by default, enforce credentials

independently of optional configuration, prohibit executable deserialization

in network handlers, and apply least privilege to inference services.

Find out what's already
exploitable in your codebase.