2026-11-26 15:49 UTC

Cloudflare reports 155 GLM-5.3 responses exposed cross-tenant KV-cache data

state: significantheat: lowuncertainty: mediumrelevance: highkv-cache-leakage inference-security cloudflare-workers sglangCloudflareSGLang TeamGadi EvronKnostic

What is this?

Cloudflare and the SGLang team published a coordinated disclosure on October 26, 2026, about cross-tenant KV-cache exposure in Workers AI’s GLM-5.3 deployment. Cloudflare says that from August 27 to September 9, a mismatch between the model’s 1,048,576-token context limit and the prefill cache’s 681,280-token capacity made SGLang’s disaggregated-serving rejection bug reachable; 155 responses to prompts above the cache limit contained data from other customers’ recent requests. Cloudflare says it found no evidence of deliberate exploitation, fixed the configuration and engine, and restored the model on September 9. The teams also describe upstream SGLang fixes and related cache-lifetime risks in asynchronous prefill/decode transfers. A SGLang disclosure notes that additional failed-send safeguards for NIXL and MORI are slated for v0.5.23, so not all related protections were included in v0.5.22.

Why it matters

This is a concrete, high-impact example of how inference infrastructure can become a cross-tenant security boundary: a cache-capacity/configuration mismatch plus a serving-engine rejection bug caused some model responses to expose fragments of other customers’ requests. The incident also shows why longer-context, faster distributed serving creates subtle memory-lifetime and coordination risks. The published fixes and operator guidance could improve isolation across SGLang deployments, but related protections are version- and backend-dependent, so operators should check which safeguards their deployments actually include.

Current assessment

Cloudflare and SGLang’s October 26, 2026 coordinated disclosures describe a cross-tenant KV-cache exposure in Workers AI’s GLM-5.3 from August 27 until remediation and model restoration on September 9. Cloudflare reports 155 affected responses to prompts exceeding the prefill cache pool’s 681,280-token capacity, despite a configured 1,048,576-token context window; it attributes the exposure to an SGLang disaggregated-serving rejection-path bug and says it found no evidence of deliberate exploitation or impact to other Workers AI models. These impact and investigation findings are Cloudflare’s claims. Both teams describe fixes and related cache-lifetime risks, with safeguards dependent on backend and version; additional NIXL and MORI safeguards were slated for SGLang v0.5.23. New evidence consists of two low-engagement HN submissions titled as a KV-cache safety checker prompted by the incident. They signal a possible defensive artifact, but supplied evidence does not establish its capabilities, validation, availability details, or adoption. The incident remains a consequential example of inference-cache handling becoming a tenant-isolation boundary; further implementation and deployment evidence is unresolved.

Measured heat

now 0 pts/hpeak 0 pts/hcomments 0/hpeers p10momentum: steady2 platformsage 3457h
points/hour across evidence · reading as of 2026-11-27 02:23:58.509736+11:00 · deterministic, not a model opinion

How the heat travelled

07-05 14:00⭐ origin echo-reconstructedThe earliest primary artifact I found is the SGLang issue opened July 6, 2026, reporting: “when a request's input length exceeds max_req_inp
kevin-14 on github (echo) · attributed from hn.story.50252159, hn.story.50252391
—
10-26 22:41first on hacker news · published · +2720.7hCross-request KV cache exposure in the GLM-5.3 Workers AI model (155 responses)
wondersky
—
10-26 22:41amplified on hacker news 👑hn.story.50252159
wondersky
peak 182 · 79 comments · 95% of case engagement
10-26 23:02amplified on hacker newshn.story.50252391
moelove
peak 1 · 0 comments · 0% of case engagement
11-05 10:22amplified on hacker newshn.story.50377456
byoungyoung
peak 3 · 0 comments · 1% of case engagement
11-05 10:48amplified on hacker newshn.story.50377638
jongukc
peak 9 · 0 comments · 3% of case engagement
10-26 23:28our radar first saw it · +2721.5hdiscovery anchor: hn.story.50252159—

Evidence (5) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnCross-request KV cache exposure in the GLM-5.3 Workers AI model (155 responses)
Retrieved article excerpt

Open article · Retrieved 2026-10-26T23:29:53.703046+00:00

[Security](https://blog.cloudflare.com/tag/security/)[Workers AI](https://blog.cloudflare.com/tag/workers-ai/)

October 26, 2026

# Cross-request KV cache exposure in the GLM-5.3 Workers AI model, and our remediation with SGLang

Kevin FlansburgMichelle Chen

[Kevin Flansburg](https://blog.cloudflare.com/author/kevin-flansburg/) and [Michelle Chen](https://blog.cloudflare.com/author/michelle/)

16 minute read

COPY URL

On September 8, 2026, we were alerted by a security researcher, Gadi Evron from Knostic, to a tenant isolation issue affecting the GLM-5.3 Workers AI model (`@cf/zai-org/glm-5.3`) starting on August 27, 2026. We have remediated the issue, and we restored the model on September 9. We have confirmed that no other model hosted on Workers AI was affected.

Between August 27 and September 9, a small number of customers using the GLM 5.3 Workers AI model received responses that contained data from other customers' requests made to the same model shortly before theirs. In total, 155 responses were affected, all to prompts longer than 681,280 tokens.

After excluding our own testing and the researcher's, the requests we identified are consistent in timing and volume with ordinary long-context use, not with someone repeatedly exploiting the bug. We found no evidence of deliberate exploitation.

Today we are publishing this report alongside a post from SGLang, the open-source inference engine that we use, as a coordinated disclosure. This post describes the bug that caused this issue, our response timeline, and the subsequent hardening we have conducted on our production SGLang deployments. We also detail our continued efforts with the upstream maintainers of SGLang to address this and similar bugs.

## What happened

GLM is a text generation model from [Z.ai](http://z.ai) that is built for agentic coding workflows; it is one of the many [models](https://developers.cloudflare.com/workers-ai/models/) available through Workers AI. Gadi Evron submitted a report on September 8 through our HackerOne program stating that very long prompts sent to `@cf/zai-org/glm-5.3` on Workers AI sometimes returned text that belonged to other users' sessions. Cloudflare reproduced the issue the next morning and took the model offline within 40 minutes of declaring an incident. We then deployed a corrected configuration and a patched inference engine, and restored service the same day.

This specific report of cross-request KV cache exposure was the result of two overlapping issues. The first was a misconfiguration of the open-source inference engine, SGLang, used by Cloudflare. 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. We were aware of this mismatch before launch. We expected the engine to return an error for any prompt it could not process, and our long-context tests returned successful responses, so we did not believe this to be an issue.

The second was a bug in how SGLang handled the resulting over-length requests in disaggregated prefill/decode mode. A prompt that did not fit the pool was internally marked as rejected and replaced with a one-token placeholder, but instead of aborting the request and returning a client error, prefill generated the KV cache for the placeholder prompt and transferred it to the decode node. The decode node received a "transfer complete" message and assumed that prefill overwrote the KV cache from previous requests with the full prompt for this request, when in fact it left the majority of the previous state intact. The decode node subsequently generated a response while attending over stale cache pages that still held data from earlier requests. As a result, responses to prompts longer than 681,280 tokens could contain data from other users' GLM 5.3 sessions.

## Immediate remediation

After [disabling the model](https://www.cloudflarestatus.com/incidents/jsvvrtk5hvym), we took the following actions to correct this vulnerability before restoring public access to it:

**To fix our configuration, we made the pool hold the full context.** We adjusted our GLM 5.3 configuration to match our GLM 5.2 configuration, which freed enough GPU memory that the prefill KV pool now holds about 2.04 million tokens, roughly twice the 1,048,576-token context length. A prompt that fits the context window now always fits the pool, so the rejection path is never reached for a valid request. This alone prevents the bug from being exercised.

**To fix the engine, we also made the rejection path safe.** Relying on pool size alone is fragile: any change to quantization, tensor parallelism, CUDA graph sizes, or a future model version changes the pool size in a way that's easy to miss. Furthermore, there may be other situations in which the prefill scheduler can reject a request and trigger the same bug. To prevent this, we also patched the engine so that a request carrying a pending rejection is retired at the disaggregation admission queue, with its original error, before any bootstrap, allocation, or KV transfer happens. We proposed this upstream as [#38704](https://github.com/sgl-project/sglang/pull/38704), which also had the decode node verify that the number of tokens transferred matches the number it reserved. The fix was already on SGLang `main` in [#36988](https://github.com/sgl-project/sglang/pull/36988), merged September 6 for a related failure path but not yet released. The maintainers also merged [#38935](https://github.com/sgl-project/sglang/pull/38935), which rejects these requests earlier, following our approach.

We validated both changes against the researcher's reproduction script and our own canary-marker tests before restoring the model.

## Background: how we serve GLM 5.3

Workers AI runs GLM 5.3 with SGLang in a disaggregated configuration: a pool of prefill GPUs processes the prompt and produces the model's KV cache for it, then hands that cache over remote direct memory access (RDMA), via [Mooncake](https://kvcache-ai.github.io/Mooncake/), to a pool of decode GPUs that generate the response. We have written about this architecture before in our posts on [high-performance LLMs](https://blog.cloudflare.com/high-performance-llms/) and [smaller, faster, safer models](https://blog.cloudflare.com/smaller-faster-safer-models/).

The KV cache in GPU memory is a shared pool of fixed-size pages. Each request is assigned pages when it is admitted and releases them when it finishes. Pages are not currently zeroed between requests; the next request that gets a page simply overwrites it. This approach is common among inference engines and is necessary to achieve the best performance, but it means that the inference engine is responsible for tracking ownership of these memory pages. KV cache page ownership and lifetime tracking has to deal with not just shared ownership within a node (KV cache offload and token generation both access the memory with different lifetimes), but also ownership that is technically shared with the remote prefill node (which holds a simultaneous mutable reference to the page).

Furthermore, the size of this pool is not a configuration value. SGLang sizes it at startup from whatever GPU memory remains after loading the model weights. The model's advertised context length is a separate configuration value. Nothing forces the two to agree, and it is our job to check that they do.

## Issue one: misconfiguration

On our GLM 5.3 prefill nodes with our configuration, the pool came to 681,280 tokens while the model's context length is 1,048,576 tokens. The selected KV pool size is printed by SGLang in logs during startup and exposed as a metric. We were aware of this size mismatch; however, during pre-launch testing we observed successful HTTP status codes and a streaming body with no error frames during benchmarking. We assumed that the engine was capable of gracefully handling the difference between the KV cache pool and requested context window via streaming or some other mechanism.

This was one critical gap in our testing: we only validated HTTP response codes and engine performance at long contexts, without validating model output and coherence. We now check KV pool size against context length directly, from the running engine, before any disaggregated deployment change ships, rather than inferring it from response codes.

## Issue two: SGLang bug

In v0.5.21, the SGLang team has now addressed this bug in how it was handling prompts longer than the KV pool size. Here’s what was happening before.

When a prompt arrived that was longer than the KV pool could hold, SGLang's scheduler rejected it. The rejection path (`Req.set_finish_with_abort`) recorded the error to be returned to the client and swapped the prompt for a one-token placeholder so that the request could drain through the normal batch machinery without allocating real memory. On a single-node deployment this worked: the placeholder ran, the batch finished, and the client received an error.

In disaggregated mode such as we operate, the admission queues on both prefill and decode checked whether a request was *finished*, not whether it was *rejected*. A rejected request reported itself as live. So:

1. **Bootstrap.** The router told the decode node the prompt length (8 pages in the diagram). Decode reserved 8 KV pages for the request.
2. **Prefill admission.** The prefill admission queue admitted any request where `req.finished()` was False. A rejected request stored its rejection in `to_finish`, not `finished_reason`, so `finished()` still returned False. The rejected request was admitted.
3. **Prefill forward pass.** Rejection had already replaced the prompt with a one-token placeholder. Prefill ran a trivial forward pass on that one token.
4. **KV transfer.** Prefill sent one page of KV to decode and signaled that the transfer was complete.
5. **Decode admission.** Decode's admission queue had the same `finished()` check, so it accepted the handoff.
6. **Decode attention.** Decode started generating and attention read all 8 reserved pages. Only page P0 had been written by this request. Pages P1 to P7 still held what earlier requests left in them: other users' prompts and partial generations.
7. **Response.** The client got HTTP 200 instead of HTTP 400. `prompt_tokens` matched the long prompt and the reply was coherent. It arrived faster than an 8-page prefill should take, and it contained content from other users' KV pages.

Every request over the threshold behaved this way. This bug had been reported to SGLang by another user as issue [#30233](https://github.com/sgl-project/sglang/issues/30233) on July 6, 2026, which Cloudflare noticed while investigating this incident. We had been flagging these types of issues with SGLang since v0.5.10 and this security incident sped up work that Cloudflare had already started in collaboration with the SGLang team. The patch for this issue was released in SGLang v0.5.20, with follow-ups in v0.5.21 and v0.5.22, and is available for all other operators dependent on SGLang to use. We highly recommend all operators update SGLang dependencies to v0.5.22 or later. For more details on specific PRs, read on below.

GLM 5.3 was the only model affected by this bug. Every other disaggregated deployment on Workers AI has KV pools larger than its context length on both prefill and decode, so no request could reach the rejection path. We have applied the engine fix and the hardening described below to every model we serve with SGLang, and our deployment checks require them for every new deployment.

## Timeline

All times UTC.

|  |  |
| --- | --- |
| When | What |
| Aug 27, 2026 | GLM 5.3 launched on Workers AI with a prefill KV pool smaller than its context window. The exposure was present from launch. |
| Sep 8, 2026 - 23:11 | Report received via HackerOne. |
| Sep 9, 2026 - 08:00 | Cloudflare begins verifying the HackerOne report. |
| Sep 9, 2026 - 13:22 | Secur
wondersky18279
🟧 hnCross-request KV cache leakage in SGLang PD disaggregation
Retrieved article excerpt

Open article · Retrieved 2026-10-26T23:29:54.102745+00:00

# SGLang security update: improving request isolation

SGLang TeamOctober 26, 2026

On this page

- [Impact and affected deployments](https://www.lmsys.org/blog/2026-10-26-cf-security/#impact-and-affected-deployments)
- [What happened](https://www.lmsys.org/blog/2026-10-26-cf-security/#what-happened)
- [Immediate remediation and upstream fix](https://www.lmsys.org/blog/2026-10-26-cf-security/#immediate-remediation-and-upstream-fix)
- [Related KV cache lifetime issues](https://www.lmsys.org/blog/2026-10-26-cf-security/#related-kv-cache-lifetime-issues)
- [Background](https://www.lmsys.org/blog/2026-10-26-cf-security/#background)
- [The Problem: When Is a KVCache Slot Actually Free?](https://www.lmsys.org/blog/2026-10-26-cf-security/#the-problem-when-is-a-kvcache-slot-actually-free)
- [Impact and Exposure](https://www.lmsys.org/blog/2026-10-26-cf-security/#impact-and-exposure)
- [Deterministic Reproduction](https://www.lmsys.org/blog/2026-10-26-cf-security/#deterministic-reproduction)
- [The Fix: Deferred KVCache Release](https://www.lmsys.org/blog/2026-10-26-cf-security/#the-fix-deferred-kvcache-release)
- [Deferred Release](https://www.lmsys.org/blog/2026-10-26-cf-security/#deferred-release)
- [Admission Fix](https://www.lmsys.org/blog/2026-10-26-cf-security/#admission-fix)
- [Mooncake Transfer Batch Size Tuning](https://www.lmsys.org/blog/2026-10-26-cf-security/#mooncake-transfer-batch-size-tuning)
- [PD Checksum](https://www.lmsys.org/blog/2026-10-26-cf-security/#pd-checksum)
- [Performance Impact](https://www.lmsys.org/blog/2026-10-26-cf-security/#performance-impact)
- [Recommended actions for operators](https://www.lmsys.org/blog/2026-10-26-cf-security/#recommended-actions-for-operators)
- [Conclusion](https://www.lmsys.org/blog/2026-10-26-cf-security/#conclusion)
- [Acknowledgement](https://www.lmsys.org/blog/2026-10-26-cf-security/#acknowledgement)
- [Pull Request List](https://www.lmsys.org/blog/2026-10-26-cf-security/#pull-request-list)
- [Reference](https://www.lmsys.org/blog/2026-10-26-cf-security/#reference)
- [Appendix](https://www.lmsys.org/blog/2026-10-26-cf-security/#appendix)
- [Related issues and fixes](https://www.lmsys.org/blog/2026-10-26-cf-security/#related-issues-and-fixes)
- [Disclosure Timeline](https://www.lmsys.org/blog/2026-10-26-cf-security/#disclosure-timeline)

On September 9, 2026, Cloudflare notified us of cross-request KV cache exposure in its GLM-5.3 deployment on Workers AI. We worked with Cloudflare to address the request-rejection path involved and strengthen related cache-lifetime handling in disaggregated serving.

We are publishing this disclosure in coordination with Cloudflare and the researcher who reported the issue through Cloudflare’s HackerOne program. Cloudflare’s report covers its production incident and customer impact, and the researcher’s report (available soon) will describe the discovery and external validation. This post focuses on the underlying mechanisms, the changes we made, and guidance for SGLang operators.

[Read Cloudflare’s report here.](https://blog.cloudflare.com/kv-cache-exposure-remediation/)

## Impact and affected deployments

Cloudflare reports that the incident affected `@cf/zai-org/glm-5.3` on Workers AI between August 27 and September 9, 2026. Its investigation found no other Workers AI model affected.

Cloudflare’s investigation found that requests exceeding the prefill KV cache capacity could return content from another user’s session. For details on the incident’s scope and customer impact, see Cloudflare’s incident report.

The issue occurred in disaggregated prefill/decode serving, where separate workers process the prompt and generate the response. The single-node rejection path returned an error instead.

## What happened

Cloudflare’s deployment had a configured context length of 1,048,576 tokens, but its prefill KV cache pool could hold 681,280 tokens. A request could therefore fit the configured context window while exceeding the memory available to process it.

In SGLang’s disaggregated prefill/decode path, a request marked for rejection could still proceed through the handoff. Decode could then read cache pages that had not been populated for that request. The configuration mismatch made the rejection path reachable. The admission fix described below ensures that a rejected request returns an error before entering the disaggregated handoff. It complements deployment checks that compare pool capacity with the configured context length.

## Immediate remediation and upstream fix

Cloudflare disabled public access to the model on September 9. It increased the prefill pool to accommodate the configured context window and deployed a Cloudflare-authored engine patch that returned errors for rejected requests. Cloudflare reports that it validated these changes against the researcher’s reproduction and its own canary-marker tests before restoring the model that evening.

The upstream fix, [#36988](https://github.com/sgl-project/sglang/pull/36988), retires aborted requests when their final prefill result is processed. Follow-up change [#38935](https://github.com/sgl-project/sglang/pull/38935) stops intake-rejected requests earlier, before they enter the disaggregated handoff, avoiding unnecessary work and delays.

## Related KV cache lifetime issues

Alongside the admission fix, we worked with Cloudflare on how SGLang handles KV cache transfers when requests are interrupted.

In prefill-decode (PD) disaggregated serving, an aborted request can still have RDMA writes in flight. If decode releases and reassigns the destination slots before those writes complete, the late writes can overwrite another request’s KVCache and corrupt its output.

Cloudflare’s report also describes our joint work on related KV cache lifetime issues. The following sections explain the deferred-release mechanism, additional transfer safeguards, and integrity checks, along with our validation results and guidance for operators.

## Background

In PD-disaggregated serving, the prefill and decode phases run on separate engines, and each request’s KVCache must move from the prefill engine into the decode engine’s memory pool. For performance, this transfer is asynchronous. Transfer engines such as Mooncake, NIXL, or MORI issue it as one-sided RDMA WRITE operations that stream KVCache chunks into pre-reserved destination slots while prefill computation is still in progress.

Because the transfer is asynchronous, a request can die while some of its writes are in flight. Prefill can then drop the chunks still waiting in its software queues, but it cannot stop a write it has launched toward the destination, such as the chunk in progress at that moment. In earlier implementations, when a request terminated mid-transfer (a client disconnect, a timeout, a transport fault), decode returned its destination slots to the allocator at termination, without waiting for such a write to finish. If the allocator reassigned the slots before the write landed, the dead request’s KVCache landed in another request’s KVCache. In typical workloads the corruption was rare, although long contexts make it far more likely (see fact 4 below). Each occurrence was silent. The transfer reported success, and no component raised an exception or logged an error. A single contaminated slot derails an entire generation, because attention reads every position.

As a result, a request asking the model to count from 1 to 15 comes back as an incoherent stream of unrelated tokens. We then set out to make the race reproducible on demand and to fix it end to end, from the transfer engine layer up to the serving engine.

## The Problem: When Is a KVCache Slot Actually Free?

The failure takes four steps:

1. A client disconnect, an admission rejection, or a transfer fault aborts request A mid-transfer while at least one launched write has not yet landed.
2. Decode frees A’s KVCache slots at abort time. The allocator marks them free while the remote writer is still writing to them.
3. The allocator hands those slots to victim request B.
4. A’s launched writes land inside B’s KVCache, and B decodes on foreign keys and values with no error.

These steps apply to any PD implementation that moves KVCache between engines with asynchronous DMA, push or pull, because each one has to decide when a slot is free. We diagnosed and fixed the family in SGLang.

An aborted request's launched writes land in KV cache slots that have already been reassigned to another request.

***Figure 1:** The race. The abort frees A’s slots while A’s launched writes are still landing; B inherits the slots and the late writes land inside its KVCache.*

Four facts about the system make each step possible.

**1. The allocator can mark a slot free while writes to it are in flight.** In PD disaggregation, the decode engine pre-reserves destination KVCache slots for each incoming request, and its allocator tracks them as allocated or free. But “free” has a second, hidden condition: A slot is safe to reuse only when *no remote writer can still touch it*. The bugs in this class come from the gap between these two definitions. Each one is a distributed use-after-free, where the dangling pointer is a write request sitting in a NIC queue on another machine. The fix makes the second condition explicit, observable, and bounded.

**2. Launched RDMA work cannot be cancelled, for push and pull alike.** SGLang’s KVCache transfer is push-based [3]. Prefill *writes* KVCache into decode’s memory, because prefill knows the moment it produces each chunk and can overlap transfer with ongoing computation, chunk by chunk. At and below the NIC, cancellation is hard to achieve without hurting availability. The RDMA API has no call that cancels an individual work request already posted to the NIC’s queue pair. Python cannot interrupt the transfer engine’s blocking C++ call (e.g., Mooncake’s `batch_transfer_sync`) mid-call. If that call times out, its work requests stay posted with no completion accounting, so those writes may land at an unknown later time. One-sided RDMA WRITE bypasses the receiver’s CPU, so decode gets no signal for each write that it could wait on. The NIC also places data per packet: A write interrupted mid-flight still leaves a partially written prefix at the destination, so even the paths that look like cancellation can mutate destination memory.

A pull-based design would not escape this. If decode issued RDMA READs instead, an abort arriving mid-pull would leave decode’s *own* posted reads landing in slots it just freed, because a posted READ is as impossible to take back as a posted WRITE. Under pull, the hazard also runs the other way: If prefill frees its source pages at abort time and the allocator reassigns them while a READ is still in flight, that read fetches another request’s KVCache into decode. Freed-then-reassigned slots corrupt the transfer at either end.

The transfer stack below the Python scheduler: aborts stop future chunks while launched transfers and posted NIC writes continue.

***Figure 2:** The transfer stack below the Python scheduler. An abort can stop future chunks, but everything already handed to the C++ engine or the NIC is beyond recall, and the receiving CPU never sees the writes at all.*

**3. Complete liveness handling starts at the router but cannot end there.** An abort is only safe when *both* halves of a P/D pair learn about it. A well-designed PD router cancels the pair together, so neither side waits out a 300-second timeout for a peer that is never coming. In `sgl-router`, [#41612](https://github.com/sgl-project/sglang/pull/41612) builds the PD pairing on top of the abort-on-disconnect of [#39461](https://github.com/sgl-project/sglang/pull/39461). The pair shares one router-minted request id. A client disconnect aborts decode, a prefill failure drops the decode request so the engine aborts it, and prefill learns of the abort through decode’s engine-side `ABORT` not
moelove10
🟧 echo.github ⭐The earliest primary artifact I found is the SGLang issue opened July 6, 2026, reporting: “when a request's input length exceeds max_req_inpkevin-14——
🟧 hnKVGuard: Catching the KV cache bug behind Cloudflare's GLM leakjongukc90
🟧 hnKVGuard: A KV Cache Safety Checker for LLM Serving Systemsbyoungyoung30

Interpretation history

Decision trace