Cloudflare disclosed that Workers AI's GLM-5.3 model exposed KV cache state across requests, affecting 155 responses in total. For teams using the model, this was more than an output anomaly: it raised questions about tenant isolation and cache scoping.
GLM-5.3 Cache Leak Exposed 155 Responses: Shared KV Is Not a Minor Issue
Cloudflare disclosed that GLM-5.3, offered through Workers AI, exposed KV cache state across requests. The issue affected 155 responses.
This was not an ordinary deviation in model output. Cached content from one request could appear in another, meaning that users shared state that should have remained isolated.
The disclosure reached the Hacker News front page, where it received 96 points and 30 comments. Developers focused on a clear question: on what boundaries does a model service reuse cached state?
Cloudflare published a dedicated vulnerability analysis and remediation guide covering cache-reuse boundaries and post-exposure response procedures. Original report: https://blog.cloudflare.com/kv-cache-exposure-remediation/
The Problem Goes Beyond a Single Response Mix-Up
The confirmed facts were:
- Cloudflare disclosed that the GLM-5.3 Workers AI model exposed KV cache state across requests.
- The exposure occurred in the model service's KV cache mechanism.
- Different requests could access cached content that should have remained isolated.
- The disclosed scope covered 155 responses.
- The Hacker News submission received 96 points and 30 comments.
That figure of 155 is more concerning than an occasional anomalous response.
A one-off error might result from scheduling jitter, an interrupted request, or temporary state contamination. When multiple responses are affected, more specific questions arise: Which requests can hit the same cache key? At which layer does reuse occur? Does the invalidation logic treat separate tenants as part of the same workspace?
The most serious risk extends beyond a user's response containing text from another request. Cached content may include sensitive inputs, intermediate model state, or context assembled from multiple requests. Examining only the final output may make it difficult to determine the full extent of the contamination.
That is why Cloudflare published a dedicated vulnerability advisory rather than a brief status update. Teams need to know the affected versions, trigger conditions, remediation steps, and follow-up verification procedures.
Why KV Cache State Leaked Across Requests
A KV cache is a common optimization in large-model inference.
As the model processes a prompt, it generates Keys and Values for the token sequence. If a later request has the same or a similar prefix, the inference system can reuse the computed KV state, avoiding repeated work and reducing latency and inference cost.
The difficulty lies in how the system defines “the same or similar.”
A simplified cache key might be generated as follows:
import hashlib
import json
def cache_key(model: str, tenant_id: str, prompt: str) -> str:
payload = json.dumps(
{
"model": model,
"tenant_id": tenant_id,
"prompt": prompt,
},
sort_keys=True,
)
return hashlib.sha256(payload.encode("utf-8")).hexdigest()
There is nothing wrong with this code. It explicitly includes tenant_id in the cache key.
The real risk usually lies outside the key itself:
- The routing layer reuses KV state based on the model, prefix, or hardware location without checking the tenant identifier.
- Cache storage is partitioned by tenant, but lookups use only the prompt hash.
- A request is retried, migrated, or prewarmed, causing its original scope information to be lost.
- Cache entries expire too late, remaining readable after the tenant or session has changed.
- Concurrent requests share a set of KV blocks, but some of those blocks originated in a different session.
For a multi-tenant model service, cache reuse can involve three layers of decisions:
- Which requests may share a prefix.
- Which partition stores the cache entry.
- Whether a cache hit still belongs to the current tenant and session.
Handling only the first layer does not complete the isolation process.
Traditional web caches generally have clear boundaries. A URL, query parameters, cookies, and the Vary header jointly determine which response applies. Model KV state is more complex because the cache holds inference state rather than a complete HTTP response. Reuse depends on token prefixes, scheduling position, model version, and execution hardware.
Once scope information does not travel with the KV state, isolation breaks inside the system.
155 Responses Deserve More Investigation Than a One-Off Anomaly
Investigating this class of incident requires more than asking whether any user saw incorrect content. Teams must establish the trigger conditions and the limits of what can be verified.
At least four areas need testing:
- Whether consecutive requests within the same tenant and session contain unexpected content.
- Whether different tenants using the same or similar prompts can hit the same KV state.
- Whether cache scope remains intact after a request retry, regional failover, or instance migration.
- Whether old entries continue to be reused after changes to the model version, cache format, or deployment configuration.
155 responses do not necessarily mean 155 affected users. They may come from a small number of sessions or span multiple accounts. Without deduplicated counts of requests, tenants, and sessions, the blast radius cannot be calculated accurately.
Likewise, “fixed” does not mean “the impact has been fully understood.”
A rigorous disclosure should provide the affected time window, cache-hit conditions, tenant-level impact counts, response procedures, and evidence that no unobserved contamination remains. If the figure of 155 came from a system audit, the disclosure should explain the counting method. If it came from active scanning or sampling, that distinction should be explicit.
The current public summary reports 155 affected responses, but the complete trigger path and more detailed scope still need to be checked against Cloudflare's follow-up documentation.
Fixing the Incident Requires More Than Clearing the Cache
Clearing the cache is usually necessary, but it is not sufficient.
KV cache data is stateful. Even after existing entries are deleted, the incident can recur if routing, key generation, invalidation policies, and retry logic remain unchanged.
Cloudflare's remediation guidance addresses cache-reuse boundaries and post-exposure response measures. At an engineering level, teams should verify at least four layers.
The first layer is the cache key. Isolation dimensions such as tenant, session, and model version cannot depend on callers remembering to provide them.
The second layer is storage and retrieval. Cache partitions, lookup conditions, and entry metadata must all use the same scoping rules.
The third layer is lifecycle management. Expiration, eviction, migration, and rollback must clear or migrate state in a coordinated way, without leaving old entries accessible across scopes.
The fourth layer is logging and auditing. Logs should record cache-entry identifiers, scope, hit results, and entry origin, but must not capture sensitive prompts or complete KV state.
Regression testing should not focus only on whether the answer is accurate. A test can create two requests with the same prompt but different tenants, then check whether either response contains content unique to the other tenant:
from collections.abc import Callable
def assert_no_cross_tenant_leak(
invoke: Callable[[str, str], str],
first_tenant: str,
second_tenant: str,
marker: str,
) -> None:
first = invoke(first_tenant, "The deployment region is us-east-1.")
second = invoke(second_tenant, "The deployment region is us-east-1.")
assert marker not in first
assert marker not in second
Both requests deliberately use the same prompt. The test verifies infrastructure scoping rather than relying on prompt differences to conceal the issue.
Production-grade testing must also cover concurrency, retries, and instance changes. Running two requests sequentially can easily miss scheduling races.
Practical Impact for Workers AI Users
Teams using GLM-5.3 should not assume that a model service provides isolation by default.
Start by reviewing inputs.
If requests include customer data, code, internal support tickets, fragments of secrets, or personal information, teams should determine whether that data could be written to a shared cache, along with the retention periods for logs and cached entries.
Then review context handling.
Do not assume that state from a previous conversation cannot enter the current response. This is especially relevant to Agent applications and long-running sessions: user identifiers, session IDs, and business tenant IDs should be passed explicitly with every request.
Verify response attribution as well.
When a model returns source identifiers, system metadata, or session summaries, compare them programmatically with the request context. Manual spot checks can reveal problems, but they cannot prove that no problem exists.
Finally, review cache invalidation policies.
Permission changes, user deletion, session termination, model upgrades, and regional migrations should all trigger invalidation at the appropriate scope. Teams should not wait for natural expiration.
One point is easy to confuse: traditional web-cache vulnerabilities usually expose entire responses or fragments, while context-window problems concern whether a model can remember content from the current session. This incident was closer to a scope error involving shared inference state. It was neither a simple HTTP cache permission misconfiguration nor a case of the model having too good a memory.
Engineering Implications
The importance of this incident lies not in the drama of the number 155, but in how shared inference infrastructure tied performance reuse directly to security boundaries. A KV cache can reduce latency and cost, but without tenant-level constraints, the saved computation may come at the price of cross-request exposure.
The long-term design after remediation matters more: Are cache keys generated and enforced by the server? Does tenant scope cover the entire lifecycle, including writes, lookups, migrations, and invalidation? Cache-isolation options and retention policies are likely to become explicit configuration settings in model APIs rather than defaults that silently share state across users.
This differed from earlier web-cache vulnerabilities because the exposed object was inference state. It also differed from context-window overruns, which usually occur within a single session. Here, the boundary between request ownership and shared state was crossed. Public information is still insufficient to reconstruct the complete trigger path or determine the number of affected tenants after deduplication. The figure of 155 confirms that the problem existed, but it cannot replace a complete impact assessment.