When Your Prompt Gets Someone Else's Answer: Inside Cloudflare's AI Cache Leak
For almost two weeks, very long prompts sent to one of Cloudflare's hosted AI models could come back with fragments of other customers' requests. How a memory mismatch and an engine bug combined, and what businesses should take from it.
For almost two weeks, very long prompts sent to one of Cloudflare's hosted AI models could come back with fragments of other customers' requests. Here is how a memory mismatch and an engine bug combined, why testing missed it, and what businesses using hosted AI should take from it.
TL;DR
- On 26 October 2026 Cloudflare disclosed that its hosted GLM-5.3 model on Workers AI returned 155 responses containing data from other customers' requests between 27 August and 9 September 2026, all to prompts longer than 681,280 tokens [1].
- The model was set up with a context window of 1,048,576 tokens, but the memory pool on its prefill GPUs held only 681,280 tokens [1].
- A bug in SGLang, the open-source inference engine Cloudflare uses, let over-length prompts carry on instead of failing. The response was built partly from stale memory left by earlier requests [1][2].
- The issue was reported by security researcher Gadi Evron of Knostic [1]. Cloudflare's launch tests checked status codes and performance, not whether the answers were correct [1].
- Cloudflare says it found no evidence of deliberate exploitation [1]. It fixed its configuration and patched the engine on 9 September, and recommends other operators move to SGLang v0.5.22 or later [1].
1. What happened
Workers AI lets developers call open models on Cloudflare's GPUs. One is GLM-5.3, a Z.ai model Cloudflare describes as built for agentic coding [1].
On 26 October, in a post by Kevin Flansburg and Michelle Chen, Cloudflare said that between 27 August and 9 September "a small number of customers" using GLM-5.3 "received responses that contained data from other customers' requests made to the same model shortly before theirs" [1]. In total, 155 responses were affected, all to prompts longer than 681,280 tokens [1]. That is far beyond everyday chat, though agentic coding tools and large document jobs can get there.
Cloudflare says that, once its own testing and the researcher's are excluded, the affected requests are "consistent in timing and volume with ordinary long-context use, not with someone repeatedly exploiting the bug" [1]. It found no evidence of deliberate exploitation and says no other model on Workers AI was affected [1].
The report came from Gadi Evron of Knostic through Cloudflare's HackerOne bug bounty programme at 23:11 UTC on 8 September (00:11 UK time on 9 September) [1]. The Injection, a security news site, says Evron traced the anomaly through OpenRouter on 7 September before reporting it [3]. On Cloudflare's timeline (UTC) [1], it began verifying it at 08:00 on 9 September, declared an incident at 13:22, set the model to private at 14:00 and restored it at 19:40 after rebuilding with a corrected configuration and a patched engine.
Cloudflare published its report on 26 October as a coordinated disclosure with the researcher and with RadixArk, the company behind the SGLang maintainers [1]. The Neuron listed it among the top AI stories of 28 October [4].
2. How it works, in plain English
To understand the leak you need three ideas: the KV cache, the split between prefill and decode, and memory that gets reused without being wiped.
The KV cache
When a large language model reads your prompt, it turns each token (roughly a word or part of a word) into internal values it needs later when writing the answer. These are stored in what engineers call the KV cache, short for key-value cache. Think of it as the model's working notes on your prompt; longer prompts need more GPU memory.
Cloudflare explains that the KV cache sits in GPU memory as a shared pool of fixed-size pages [1]. Each request is given pages when it starts and hands them back when it finishes [1].
Prefill and decode on separate machines
Generating an answer has two phases. Prefill reads the whole prompt and builds the KV cache. Decode then writes the answer one token at a time, consulting that cache at every step.
Cloudflare runs GLM-5.3 in a "disaggregated" setup: one pool of GPUs does prefill, then sends the finished cache over a fast network link to a second pool of GPUs that does decode [1]. That means two machines must agree exactly on what was sent and when it is complete. Cloudflare calls this incident "a consistency failure in a distributed system" [1].
Memory that is reused without being wiped
Here is the key detail. Cloudflare says KV cache pages "are not currently zeroed between requests; the next request that gets a page simply overwrites it" [1]. Cloudflare says this is common among inference engines and necessary for the best performance [1].
That is safe as long as every request really does overwrite every page it reads. The engine is responsible for keeping track of who owns each page [1]. If that tracking goes wrong, a request can read notes that were written for somebody else.
3. The two failures together
Cloudflare describes two overlapping problems. Neither alone produced the leak.
Failure one: a memory pool smaller than the context window
Cloudflare deployed GLM-5.3 with a 1,048,576-token context window, which is about one million tokens. But the KV cache pool on its prefill GPUs only had room for 681,280 tokens [1]. SGLang sizes that pool automatically at start-up from whatever GPU memory is left after loading the model, while the advertised context length is a separate setting [1]. As Cloudflare puts it, "Nothing forces the two to agree, and it is our job to check that they do" [1].
Cloudflare says it knew about the mismatch before launch. It expected the engine to return an error for any prompt it could not process, and its long-context tests returned successful responses, so it did not believe this was a problem [1].
Failure two: an engine bug that let rejected prompts carry on
The second problem was in SGLang. When a prompt was too long for the pool, SGLang's scheduler did reject it, internally. As part of that, it swapped the prompt for a one-token placeholder so the request could pass harmlessly through the normal machinery. On a single machine this worked and the client got an error [1].
In disaggregated mode it did not. Cloudflare explains that the admission queues on both the prefill and decode sides checked whether a request was finished, not whether it had been rejected, and a rejected request still reported itself as live [1]. So, in Cloudflare's worked example of a prompt needing eight pages [1]:
- The decode machine was told the full prompt length and reserved eight pages.
- The prefill machine admitted the rejected request and processed only the one-token placeholder.
- It sent one page of cache to decode and signalled that the transfer was complete.
- The decode machine accepted the handoff and began writing an answer, reading all eight reserved pages.
- Only the first page had been written for this request. The other seven still held what earlier requests had left behind: "other users' prompts and partial generations" [1].
The customer received a normal success response rather than an error. The token count matched the long prompt and the reply was coherent, though faster than a full prefill should take [1].
Cloudflare also says another SGLang user had already reported this bug as issue #30233 on 6 July 2026, which Cloudflare noticed only while investigating [1][3]. A related fix had been merged into SGLang's main code on 6 September but had not yet been released [1].
The two failures needed each other. With a pool large enough for the full context window, valid prompts would never have reached the faulty rejection path [1]. With a correct rejection path, the over-length prompts would simply have failed with an error [1].
4. Why testing missed it
Cloudflare did test long prompts before launch. But, in its own words, "we only validated HTTP response codes and engine performance at long contexts, without validating model output and coherence" [1]. During benchmarking it saw successful status codes and a streaming response with no error frames, and assumed the engine was handling the difference between pool size and context window gracefully [1].
The tests asked "did the request succeed?" and not "is this the right answer to this prompt?" For this bug, the first question always had the answer yes. Neoteric, a consultancy that wrote up the incident for engineers, makes the same point: "A 200 status and a streaming body proved nothing here" [5].
There is also a lesson about known warnings. SGLang logs the pool size at start-up, and Cloudflare had seen the mismatch [1]; nothing treated it as a blocker. Cloudflare says it now compares KV pool size with context length directly, from the running engine, before any change to a disaggregated deployment ships [1].
5. What has been fixed
Cloudflare describes fixes at several levels.
Its own configuration. Cloudflare changed GLM-5.3's setup to match its GLM-5.2 configuration. That freed enough GPU memory for the prefill pool to hold about 2.04 million tokens, roughly twice the context window [1]. Any prompt that fits the context window now fits the pool [1].
The engine's rejection path. Cloudflare says relying on pool size alone is fragile, because later changes can shift it unnoticed [1]. It patched SGLang so a rejected request is retired, with its original error, before any memory is allocated or transferred, and proposed this upstream [1]. SGLang's maintainers merged a change that rejects these requests at admission, following Cloudflare's approach [1].
SGLang releases. According to Cloudflare, the core fix shipped in SGLang v0.5.20, with follow-ups in v0.5.21 (released 2 October) and v0.5.22 (released 19 October) [1]. The two key changes it names landed in v0.5.20 and v0.5.21 [1][3]. Either way, its advice is to run v0.5.22 or later [1]. The v0.5.22 release page on GitHub, dated 19 October, includes related disaggregation fixes but its highlights do not single out this incident [6].
Checksum and canary checks. SGLang now has an option, added in v0.5.21, for the decode machine to verify a checksum of the transferred cache before generating, plus fixes to a "KV canary" feature that detects and logs possible corruption [1]. Cloudflare is candid that these do not yet cover every model architecture, and lists GLM-5.3 among those it is working to extend them to [1].
Wider hardening. Cloudflare says this bug belongs to a broader class of KV cache memory-safety bugs it has worked on for months, and it has applied the fix and further hardening to every model it serves with SGLang [1]. Still in progress are a draft proposal to zero KV pages on release and a page-tagging scheme that would check every read [1].
Advice to other operators. For anyone running SGLang in disaggregated mode, Cloudflare recommends [1] comparing KV pool size with context length on every node after every change ("This is the check we did not enforce"), upgrading to v0.5.22 or later as a backstop, using deferred memory release and bounded transfers, turning on checksum and canary detection where supported, and avoiding needless aborts from proxies.
The Injection says Cloudflare customers do not need to take action because the platform fix shipped on 9 September [3]. Cloudflare's post does not say how, or whether, affected customers were notified individually, a gap SOCtember also points out [2].
6. What it means for businesses using hosted AI
Most businesses will never run SGLang, but many send sensitive material to hosted models, and this is a risk standard due diligence can miss. The suggestions below are our judgement, drawing on the incident, except where a source is cited.
Questions to ask your providers
- Do you isolate memory between customers, and how? Cloudflare's report makes clear that reused, unwiped memory is normal practice for performance [1]. Ask whether extra checks, such as checksums or canaries, back up software tracking.
- How do you check that configured limits match real capacity? The root cause here was an advertised context window bigger than the memory behind it [1].
- What do your launch tests check? Correctness and isolation, or just success rates and speed?
- Which inference engine and version do you run, and how fast do you patch? Here the bug had been reported upstream in July and a related fix merged before the report, yet the vulnerable setup went live in late August [1].
- How will you tell us if we are affected? Ask for notification terms in writing. SOCtember suggests that organisations which sent very long prompts to this model during the window should review what those prompts contained and ask Cloudflare whether they were affected [2].
- Which provider actually served my request? If you use a router or aggregator, ask which host handled your traffic; the researcher first traced this anomaly through OpenRouter [3].
Long prompts deserve extra care
The leak only affected prompts longer than 681,280 tokens [1]. Very long contexts push hardware and software closer to their limits, and limits are where the less tested code paths live. Knostic's findings, as summarised by The Injection, add that triggering the leak needed only an ordinary paid account and an API token, and that affected requests were billed in full [3].
Our view: treat a maximum context window as a claim to test, not a guarantee. If you routinely send whole codebases or customer records in one prompt, ask whether the most sensitive parts could be left out or split up.
How to test your own setup
Cloudflare and Neoteric describe canary-style testing at the engine level [1][5]. A similar idea can be adapted by customers. This is our suggestion, not something the sources prescribe:
- Plant unique markers. Put made-up, unique strings in test prompts, and check that they never appear in responses to other test prompts or accounts. Neoteric describes sending distinct marked prompts concurrently, then over-length prompts, and checking that no marker turns up in any response [5].
- Test at the edges. Include prompts near and above the advertised context limit. An over-length prompt should fail with a clear error.
- Check answers, not status codes. Make automated tests confirm that the response actually relates to the prompt. A fast, coherent, successful reply can still be wrong, as this case shows [1].
- Watch for oddities. Unusually fast replies to huge prompts, or mentions of things you never sent, deserve investigation [1].
- Use synthetic data only in these tests.
Cordoval's take
This was not a dramatic hack. By Cloudflare's account, it was a known configuration mismatch, an engine bug already reported by someone else, and a test suite that checked the wrong thing [1]. Together they meant that some customers' prompts were answered partly from other customers' data, with nothing in the response to signal a problem.
Cloudflare deserves credit for a candid report, quick containment and fixes contributed back upstream [1]. But the episode shows that isolation between customers in hosted AI can depend on careful bookkeeping in fast-moving software. For businesses, the practical response is to ask sharper questions of providers, be deliberate about what goes into very long prompts, and test whether answers are right, not just whether requests succeed.
Sources
- Cross-request KV cache exposure in the GLM-5.3 Workers AI model, and our remediation with SGLang, Cloudflare (26 Oct 2026)
- Cloudflare Says a Workers AI Model Returned 155 Responses Containing Other Customers' Data Over Nearly Two Weeks, SOCtember (27 Oct 2026)
- Cloudflare Workers AI: GLM-5.3 answered 155 prompts with other tenants' data, The Injection (26 Oct 2026)
- Everything That Happened in AI Today (Wednesday, October 28, 2026), The Neuron (28 Oct 2026)
- Upgrade SGLang to v0.5.22: Long Prompts Leaked Other Users' Data, Neoteric (28 Oct 2026)
- SGLang v0.5.22 release notes, sgl-project on GitHub (19 Oct 2026)