| Titolo | SGLang Project (sgl-project) SGLang 0.5.23 Use-After-Free |
|---|
| Descrizione | A use-after-free vulnerability in SGLang's UnifiedRadixCache can cause requests to access KV cache slots that have been freed and reassigned to another tenant. The vulnerability occurs when a streaming-session turn changes its prefix-cache namespace and is subsequently aborted.
Streaming sessions reuse KV state from earlier turns without verifying that the new request's cache namespace matches the namespace associated with that state. Namespace changes can result from different cache_salt, extra_key, or LoRA settings. Adding an image to a later turn can also change the namespace automatically through multimodal cache binding.
When the affected turn is aborted, the streaming-session handler transfers its KV record and existing tree lock to the generic release path. That path checkpoints the request's KV row under the new namespace, including prefix slots already owned by a radix node in the original namespace. Because the namespaces differ, the insertion does not deduplicate against the original node. Two independently managed cache nodes consequently reference overlapping physical KV slots.
After release, both nodes become eligible for eviction. Evicting either node returns its slots to the allocator while the surviving node retains references to them. Once those slots are allocated to another request, a prefix-cache hit on the surviving node can consume that request's KV state. Evicting the surviving node can then free the same slots again while the new request is still using them, allowing further allocations to overlap live request state.
The resulting ownership violation can cause cross-request state corruption, incorrect generated output, and potential disclosure of information represented in another tenant's KV cache. Recovery of specific plaintext secrets through generated output has not been established by the evidence reviewed.
The affected configuration requires streaming sessions using UnifiedRadixCache, with subsequent cache eviction and slot reallocation. A caller can trigger the faulty ownership transition through its own session; the reported attack chain does not require knowledge of another tenant's prompt, cache_salt, session identifier, or KV slot indices. |
|---|
| Fonte | ⚠️ https://github.com/sgl-project/sglang/issues/44840 |
|---|
| Utente | Zyz3366 (UID 97230) |
|---|
| Sottomissione | 09/11/2026 21:17 (25 giorni fa) |
|---|
| Moderazione | 04/12/2026 09:26 (25 days later) |
|---|
| Stato | Accettato |
|---|
| Voce VulDB | 449621 [SGLang fino a 0.5.23 Unified Radix Cache streaming_session.py try_match_prefix buffer overflow] |
|---|
| Punti | 20 |
|---|