Cloudflare says a bug in its hosted AI model leaked other customers' text

In short

155 responses that carried other customers' data; 681,280 tokens the prefill memory pool could hold; 1,048,576 tokens the model's context window allowed; ~2.04 million tokens the pool holds after the fix

What happened

GLM-5.3 is Z.ai's model for agentic coding, not Cloudflare's; Cloudflare runs it as @cf/zai-org/glm-5.3 among the other models on Workers AI. Evron told Cloudflare through its HackerOne bug-bounty programme that very long prompts "sometimes returned text that belonged to other users' sessions".

Cloudflare's post-mortem, by Kevin Flansburg and Michelle Chen, says no other Workers AI model was affected, and that the long requests it found "are consistent in timing and volume with ordinary long-context use, not with someone repeatedly exploiting the bug." That is the company's own reading of its logs; the post says only that "a small number of customers" received the 155 responses.

How it works, in plain English (our explanation)

As a model reads a prompt, it keeps what it has worked out about each token (word piece) in GPU memory called the KV cache, its working memory, and looks back at it while answering.

Cloudflare runs GLM-5.3 in a disaggregated set-up: one group of GPUs (prefill) reads the prompt and builds its KV cache, then copies that cache across the network to a second group (decode), which writes the answer. The cache lives in a shared pool of fixed-size pages. Pages are not wiped between requests, for speed, so the engine must track which pages each request has really written.

Two problems that met

A pool smaller than the window. Cloudflare set GLM-5.3's context window to 1,048,576 tokens, but the KV pool on its prefill GPUs had room for only 681,280. SGLang sizes the pool from GPU memory left after loading the model, so "nothing forces the two to agree". Cloudflare says it knew of the mismatch before launch but expected the engine to return an error for any prompt it could not hold. Its tests checked success codes and speed, not whether the answers made sense.

A rejection that did not stop the request. SGLang did reject a prompt too big for the pool. It noted the error and swapped the prompt for a one-token placeholder so that the request could drain through the system. On a single machine that ended in an error for the client. In disaggregated mode, the queues on both sides checked whether a request was finished, not whether it was rejected, so the rejected request carried on.

In Cloudflare's example, decode reserved 8 pages, prefill sent 1 page for the placeholder and reported the transfer complete, and decode answered while reading all 8. Pages 2 to 8 "still held what earlier requests left in them: other users' prompts and partial generations." The client got a normal success code, and a coherent reply that held other people's content.

Another user had reported the SGLang bug as issue #30233 on 6 July 2026; Cloudflare says it noticed only during its investigation.

The response

Cloudflare's timeline (all times UTC) shows the model was set to private 38 minutes after the incident was declared (our count from 13:22 to 14:00), and back in public 5 hours 40 minutes after that (our count, 14:00 to 19:40).

27 Aug 2026: GLM-5.3 launches on Workers AI with the undersized pool. The exposure is present from launch. 8 Sep, 23:11: The report arrives through HackerOne. 9 Sep, 13:22: Cloudflare declares a security incident; its product security team reproduces the leak with two separate accounts within 25 minutes. 9 Sep, 14:00: GLM-5.3 is set to private; requests return an error. 9 Sep, 19:40: The model is restored, with a corrected configuration and a patched engine checked against the researcher's script. 2 Oct and 19 Oct: SGLang releases v0.5.21 and v0.5.22 with the fixes. 26 Oct: Cloudflare, SGLang and the researcher publish together.

There were two fixes. New settings, matching Cloudflare's GLM-5.2 deployment, freed enough memory for a prefill pool of about 2.04 million tokens, roughly twice the context window, so a valid prompt can no longer hit the rejection path. It also patched the engine so that a rejected request is retired with its error before any memory is reserved or copied. The SGLang change that stops this exposure, #36988, had been merged on 6 September for a related failure but not yet released; it shipped in v0.5.20, and an earlier-rejection fix modelled on Cloudflare's draft followed in v0.5.21.

A wider class of bugs

Cloudflare calls this one of a family of "KV cache memory-safety bugs" it had worked on for months, where a page is freed, reused or read while something else still has a claim on it. The SGLang post describes a related race, late writes from an aborted request landing in another request's pages, that affected default disaggregated set-ups from early 2025 until v0.5.21. It says that corruption "leaves no error or log line".

What operators are told to do

Cloudflare's advice to anyone running SGLang with separate prefill and decode machines:

Terms in plain English

Where things stand

Cloudflare says the engine fix and extra safeguards now run on every model it serves with SGLang and are required for new deployments. Longer term it wants the engine to check, each time decode reads memory, that the page belongs to the request; a prototype tested in August cost under 1% in throughput but was switched off for reliability problems. It also plans to use formal verification on the cache-transfer protocol. The researcher's own write-up had not been published when SGLang posted.

Sources

Sources

More from Open Models

All stories from Open Models