Summary
SGLang's LoRA adapter loading endpoint does not enforce the authorization check used by sibling administrative endpoints. If the endpoint is network-reachable, an unauthenticated attacker may load a supplied adapter and manipulate the model being served; a separately documented deserialization bypass could make the issue more severe when chained with it.
Affected context
The issue affects SGLang through version 0.5.23 in the POST /load_lora_adapter_from_tensors endpoint. Unlike sibling administrative endpoints, this endpoint lacks the applicable authorization decorator. Risk depends on whether the endpoint is exposed to an attacker and whether deployment controls otherwise restrict access.
Exploit preconditions
- Attack surface: The HTTP API endpoint for loading LoRA adapters
- Required access: Network reachability; the affected endpoint does not require an API key
- Trigger point: A request to the adapter-loading endpoint with attacker-supplied serialized tensors
- Why exploitation is possible: The endpoint lacks the authorization enforcement present on sibling administrative routes
- Additional impact condition: Remote code execution depends on chaining with a separately documented deserialization bypass; it is not established by the authorization flaw alone
Why this happens
The endpoint omits an authorization check that should protect an administrative operation. As a result, an unauthenticated caller can reach functionality intended to load model adapters. This is CWE-862: Missing Authorization: the application does not verify that a requester has permission to perform a sensitive action.
Potential impact
- An attacker could load an unauthorized LoRA adapter and alter the model's behavior.
- The served model may produce manipulated or unreliable outputs.
- Trust in model integrity could be reduced, potentially affecting downstream users or systems.
- If chained with the separate deserialization bypass, an attacker may achieve remote code execution with the privileges of the service, reported as root in the described scenario.
General mitigation guidance
Defensive approaches focus on consistently authorizing sensitive model-management operations:
- Require authentication and explicit administrative authorization for adapter-loading endpoints.
- Apply a shared authorization policy or middleware to related administrative routes to reduce inconsistent enforcement.
- Treat uploaded tensors and other client-supplied data as untrusted, and use safe, constrained parsing and validation.
- Limit the service account's privileges and isolate model-serving workloads to reduce the impact of a compromise.
- Restrict network access to administrative APIs and expose only the capabilities required by each deployment.
How teams detect issues like this
- Review route definitions for sensitive endpoints that lack authentication or authorization middleware.
- Use static analysis or code review checks to compare security decorators and policies across related administrative routes.
- Monitor API access logs for adapter-loading requests from unauthenticated or unexpected sources.
- Enforce policy checks in CI and deployment configuration so administrative endpoints are not exposed without access controls.

