Self-hosting SGLang? What to check after Cloudflare's KV cache disclosure
Cloudflare and SGLang say a context-length and KV-pool mismatch, plus an engine bug in disaggregated mode, let some responses carry other users' data. Here is what the two sources say operators should check, change and upgrade.

On Monday 26 October 2026 Cloudflare published a report on a "tenant isolation issue" in its GLM-5.3 Workers AI model, alongside a post from the SGLang team, in what both describe as a coordinated disclosure. This guide sets out what self-hosting teams can check, drawing on those posts and SGLang's release notes and docs.
What happened, briefly
Cloudflare says that between 27 August and 9 September "a small number of customers" using the model received responses containing data from other customers' requests. "In total, 155 responses were affected, all to prompts longer than 681,280 tokens." It says it found "no evidence of deliberate exploitation" and that no other Workers AI model was affected.
The bug, per the two sources
Cloudflare describes "two overlapping issues":
- A configuration mismatch. "We deployed GLM 5.3 with a 1,048,576-token context window, but the KV cache pool on our prefill GPUs only had room for 681,280 tokens." Cloudflare notes that SGLang sizes the pool at startup from leftover GPU memory, separately from context length: "Nothing forces the two to agree, and it is our job to check that they do."
- An engine bug in disaggregated prefill/decode mode. An over-length prompt "was internally marked as rejected and replaced with a one-token placeholder", but prefill still handed KV cache to the decode node, which then generated "while attending over stale cache pages that still held data from earlier requests."
SGLang's post agrees that "The configuration mismatch made the rejection path reachable." It also covers a related bug class: when a request is aborted mid-transfer, already-launched RDMA writes can land in cache slots reassigned to another request.
Who is plausibly affected
- Disaggregated deployments. SGLang says the issue "occurred in disaggregated prefill/decode serving" and that "The single-node rejection path returned an error instead."
- Context length larger than the KV pool. The condition both posts name for the rejection bug.
- The abort race. SGLang says that within PD deployments, "default configurations were affected from the v0.4.x line (early 2025), when PD disaggregation shipped with RDMA backends, until v0.5.21, or v0.5.22 for MORI."
A success code proves little here. Cloudflare says affected clients "got HTTP 200 instead of HTTP 400" and "the reply was coherent". SGLang says that for the abort race, "A deployer has no reliable way to tell, because the corruption leaves no error or log line."
Steps to take
Both posts address their recommendations to disaggregated (PD) deployments.
1. First, establish whether the advice applies: check whether you run PD disaggregation. SGLang's server-arguments page says --disaggregation-mode is "Only used for PD disaggregation" and that "If not specified, it is not PD disaggregated".
2. Compare the KV pool with context length on every prefill and decode node. Cloudflare's first recommendation is to take that reading "from the engine's startup log, after every change to weights, quantization, parallelism, or memory fraction. If the pool is smaller, lower the context length to fit." SGLang's tuning docs show an example startup line that carries both max_total_num_tokens and context_len, and its API docs say /server_info returns "token limits, and memory pool sizes". On our reading, max_total_num_tokens is the pool figure: the docs describe the related --max-total-tokens flag as "The maximum number of tokens in the memory pool." The context flag is --context-length. Cloudflare adds: "do not assume the engine will reject what does not fit."
3. Upgrade. Cloudflare: "We highly recommend all operators update SGLang dependencies to v0.5.22 or later." Its post also says operators running disaggregated SGLang "should update to v0.5.22 or backport these patches as needed." In SGLang's release notes, v0.5.20 includes "[VLM] Retire aborted disaggregated prefill results" (#36988). v0.5.21 includes "[PD] Do not admit intake-rejected requests to a PD handoff" (#38935) and makes PD decode defer KV release on abort by default on the Mooncake and NIXL backends (#41023). v0.5.22 adds "[PD] Centralize drain-aware abort acknowledgements" (#37077), which SGLang says MORI deployments need, and the deferred-release metrics (#41128). Cloudflare's post names both v0.5.20 and v0.5.21 for the fix; its table puts #36988 in v0.5.20 and #38935 in v0.5.21. v0.5.22, released on 19 October, is the newest release on SGLang's GitHub as of 28 October. SGLang says: "We have not backported this fix line to earlier release branches." Its post also lists a NIXL and MORI fix (#45973) that "ships in v0.5.23", which is not yet released.
4. If you cannot upgrade yet. For v0.5.19 or v0.5.20, SGLang says to set SGLANG_DISAGGREGATION_DEFERRED_DECODE_KV_RELEASE=1 on both prefill and decode servers. SGLang says this "enables the hold for decode-initiated aborts (the most common kind), though most releases wait out the timeout." On v0.5.20 it also advises setting SGLANG_MOONCAKE_MAX_TRANSFER_BATCH_INDICES and a release timeout of 60–120 seconds (SGLANG_DISAGGREGATION_DEFERRED_DECODE_KV_RELEASE_TIMEOUT). It adds: "Neither replaces upgrading, because failure kinds other than decode-initiated aborts stay unprotected before v0.5.21."
5. Turn on detection where it works. Both posts name --disaggregation-enable-kv-checksum. SGLang says it must be passed "to both the prefill and decode engines" and is off by default because of its performance cost. SGLang's docs say --kv-canary in 'log' mode is "production-safe". Cloudflare warns that the two checks "do not yet cover every model architecture".
6. Watch the metric and your proxy. SGLang recommends watching sglang:decode_deferred_kv_release_total{outcome} (v0.5.22) and running "a router that pairs aborts". Cloudflare advises configuring load balancers "to allow requests to proceed up to the first token".
What SGLang has and has not published
As of 28 October we found no GitHub security advisory or CVE for this issue; SGLang's repository advisory endpoint returned none. The GitHub Advisory Database lists 10 advisories for the sglang pip package, the newest published on 4 June 2026, and none concerns this bug. The v0.5.20 to v0.5.22 release notes list the fixes as ordinary changelog entries, mostly under "Parallelism & Disaggregation", not under their "Security" headings.
Why it matters
Cloudflare's own account of the gap: "we only validated HTTP response codes and engine performance at long contexts, without validating model output and coherence." On our reading, any team that treats a successful response at long context as proof the request was handled correctly is in the position Cloudflare describes.
- Cloudflare: Cross-request KV cache exposure in the GLM-5.3 Workers AI model, and our remediation with SGLang (26 Oct 2026)
- SGLang Team: SGLang security update: improving request isolation (26 Oct 2026)
- SGLang releases on GitHub (v0.5.20, v0.5.21, v0.5.22)
- SGLang docs: server arguments
- SGLang docs: hyperparameter tuning
- SGLang docs: native APIs (/server_info)
- GitHub Advisory Database: sglang (pip)
Ask Relay — he reads every question himself and replies personally by email.
