All posts

Blog

Cloudflare discloses Workers AI bug that leaked data between customers' GLM-5.3 requests

FindAmNow
CloudflareWorkers AIAI securitySGLangdata exposureAI infrastructure

Cloudflare says 155 responses from its hosted GLM-5.3 model between 27 August and 9 September 2026 contained data from other customers' requests, caused by a configuration gap and an SGLang inference-engine bug. The company says it found no evidence of deliberate exploitation and has fixed both problems.

Cloudflare has disclosed that one AI model on its Workers AI platform sometimes sent customers text from other customers' requests. The affected model was GLM-5.3, a coding-focused model from Z.ai that Cloudflare hosts. The company says 155 responses were affected between 27 August and 9 September 2026. It published the details on 26 October 2026 in a coordinated disclosure with the team behind SGLang, the open-source inference engine it uses.

What happened

According to Cloudflare, security researcher Gadi Evron of Knostic reported the problem on 8 September through Cloudflare's HackerOne bug bounty program. He found that very long prompts sent to the model sometimes came back with text belonging to other users' sessions. Cloudflare says it reproduced the leak the next day, took the model offline within 40 minutes of declaring an incident, and restored it on 9 September with a fixed configuration and a patched engine.

The company says every affected response came from a prompt longer than 681,280 tokens. It also says that, once its own tests and the researcher's were set aside, the timing and volume of the affected requests looked like ordinary long-context use rather than someone repeatedly exploiting the bug. Cloudflare says it found no evidence of deliberate exploitation, and that no other Workers AI model was affected.

Two problems stacked together

Cloudflare cites two overlapping issues.

A configuration mismatch. Cloudflare advertised GLM-5.3 with a context window of 1,048,576 tokens. But the KV cache pool on its prefill GPUs had room for only 681,280 tokens. The KV cache is the model's working memory for a prompt. Cloudflare says it knew about this gap before launch. It expected the engine to return an error for prompts that did not fit, and its long-context tests came back as successful requests. The company admits that those tests checked response codes and performance but not whether the output actually made sense.

An engine bug. Cloudflare runs SGLang in "disaggregated" mode, where one set of GPUs processes the prompt (prefill) and another set generates the answer (decode). When a prompt was too long, SGLang marked it as rejected and swapped it for a one-token placeholder. But the admission checks on both sides asked whether a request had finished, not whether it had been rejected. So the rejected request kept going. The decode side reserved memory pages for the full prompt, received only one page of real data, and then generated a reply that drew on stale pages still holding other users' prompts and answers. The client got a normal HTTP 200 response instead of an error.

Cloudflare says another user had already reported the same engine bug to SGLang as issue #30233 on 6 July 2026.

The fixes

Cloudflare says it changed its GLM-5.3 setup so the prefill pool now holds about 2.04 million tokens, roughly twice the context window. That means a valid prompt can no longer reach the faulty rejection path. It also patched the engine so that rejected requests are stopped before any memory is allocated or any data is transferred. In the weeks after the incident, SGLang merged fixes, including an earlier rejection check that follows Cloudflare's proposed approach, and per-transfer checksums. Releases v0.5.20, v0.5.21 and v0.5.22 contain this work.

Cloudflare recommends that anyone running SGLang in disaggregated mode upgrade to v0.5.22 or later, check the KV pool size against the context length on every node, and turn on corruption checks where their model supports them.

Why it matters

Hosted AI services share GPUs between many customers. For speed, inference engines often reuse memory without wiping it, relying on bookkeeping to keep customers' data apart. This incident shows how a small configuration gap and an edge-case bug can combine to break that separation without raising any error. Cloudflare says it is now working with SGLang on checks that would catch a request reading memory it does not own, and on formal verification of its KV cache transfer protocol.

Sources

Source