Submit #1088742: SGLang Project SGLang 0.5.23 Observable Behavioral Discrepancyinfo

TitleSGLang Project SGLang 0.5.23 Observable Behavioral Discrepancy
DescriptionA cross-tenant information disclosure weakness in SGLang's NGRAM speculative decoding implementation exposes acceptance statistics that depend on other tenants' prompt and response tokens. These statistics can provide a content-inference channel across requests using different cache namespaces. When --speculative-algorithm NGRAM is enabled, NGRAMWorker maintains a shared C++ NgramCorpus within each scheduler process. During decoding, token windows derived from each request's prompt tail and generated output are inserted into this corpus. Other requests retrieve speculative continuations from the same corpus without isolation by cache_salt, extra_key, or LoRA identity. Request completion removes the request's matching state but leaves its contributed corpus content available until eviction or cache clearing. SGLang exposes per-request speculative-decoding statistics, including spec_num_correct_drafts, spec_accept_length, and spec_verify_ct, through response metadata. OpenAI-compatible endpoints also expose these statistics when return_spec_tokens_details is requested. Consequently, a caller can observe acceptance behavior influenced by tokens contributed by other tenants. The public proof of concept invokes the actual C++ NgramCorpus with synthetic token IDs and demonstrates that one namespace's draft contains another namespace's secret tokens. It models greedy acceptance with a local comparison function, producing different counts for matching and nonmatching candidates. The provided demonstration establishes cross-namespace draft reuse and illustrates the proposed oracle; it does not establish end-to-end secret reconstruction through the live HTTP API. Request-level metric aggregation, output steering, and corpus changes may affect practical inference reliability.
Source⚠️ https://github.com/sgl-project/sglang/issues/49626
User
 Zyz3366 (UID 97230)
Submission11/10/2026 22:38 (20 days ago)
Moderation11/30/2026 23:06 (20 days later)
StatusAccepted
VulDB entry446853 [SGLang up to 0.5.23 NGRAM Speculative Decoding ngram_worker.py NGRAMWorker behavioral discrepancy]
Points20

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!