Back to Cloudflare

Cache Privacy and Poisoning: Test the Boundary

November 5, 2026 Wasil Zafar 29 min read

Analyze how keys, headers, and untrusted inputs affect shared reuse

Table of Contents

  1. A Shared Cache Reuses One Response Across Requests
  2. Unkeyed Inputs Can Change a Cached Representation
  3. Normalization, Cookies, and Authorization
  4. A Small Matrix That Exposes Cache Confusion
  5. Analyze a Local Cache-Policy Fixture
  6. Prove the Correct Policy Separates Two Principals

A Shared Cache Reuses One Response Across Requests

A property manager labels each parcel locker with the street address, 14 Mill Street. The apartment number is missing. The first package is for Flat 2; the next person who asks for 14 Mill Street gets it, even from Flat 1. The locker did what its label said. The label was the bug.

The edge returns bytes by string, not by person. It does not recognize Alice; it computes a key from the request and serves whatever is stored under it. Alice and Bob both request /account with different session cookies, the default key is identical, and whoever is stored first is served to both.

The vocabulary names the controls:

  • A shared cache stores one response for many users; the Cloudflare edge is shared, a browser cache is private.
  • A cache key is the string used to store and find a representation. Same key means same bytes.
  • A representation is the stored body plus the headers that survived storage.
  • An unkeyed input changes the representation but is absent from the key.
  • A principal is the identity whose data appears in the response.
  • A hit returns a fresh entry; a miss asks the origin; a bypass does not store or reuse.

The key is a sharing set

The key is a data-sharing boundary, not a lookup optimization. Every request that maps to key(request) joins the same sharing set. For every input that changes the representation, either include it in the key or ensure it cannot change the representation. Partition or sanitize, and know which one you chose.

Default key: the full URL, the Origin header, method-override headers, and forwarding headers such as x-forwarded-host (Cache keys). Not in the key: the Cookie and Authorization headers. That is a starting point, not a privacy policy.

The plan boundary is part of the design. Custom header, cookie, host, and user fields such as country and language are Enterprise-only. Free, Pro, and Business can ignore or sort query strings, cache by device type, and enable Cache Deception Armor, but cannot add a cookie or arbitrary header to the key (Cache keys availability). On those plans, a personalized page should bypass, not get a clever key. At writing time, Cache Rules include 10 rules on Free, 25 on Pro, 50 on Business, and 300 on Enterprise (Cache Rules).

Ask three questions: may this request use the cache, what key identifies the object, and may this response be stored. Figure 1 shows the sequence and the refusal branch.

A Shared Cache Reuses One Response Across Requests
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','titleColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','activationBorderColor':'#132440','signalColor':'#5a6e82','signalTextColor':'#132440','noteBkgColor':'#c4873b','noteTextColor':'#132440','noteBorderColor':'#132440','labelBoxBkgColor':'#a8dede','labelBoxBorderColor':'#132440','labelTextColor':'#132440','loopTextColor':'#132440','altBackground':'#f8f9fa','fontFamily':'DM Sans, sans-serif'}}}%%
flowchart TD
    A["Alice: GET /account
Cookie: session=alice"] --> K["Build key
scheme + host + path + query"] B["Bob: GET /account
Cookie: session=bob"] --> K K --> F{"Fresh entry
under this key?"} F -->|"yes"| H["HIT: return stored bytes"] F -->|"no"| O["Origin renders
for this request"] O --> S{"Response storable?
Cache-Control, Set-Cookie, Vary"} S -->|"yes"| W["Store under the same key"] S -->|"no"| X["BYPASS: serve once,
store nothing"] W --> H H --> R["Every later request
with this key gets these bytes"] X --> Y["Only this requester
sees the response"] classDef primary fill:#132440,color:#ffffff,stroke:#0b172b; classDef secondary fill:#16476A,color:#ffffff,stroke:#0f314a; classDef ok fill:#3B9797,color:#ffffff,stroke:#2a6f6f; classDef danger fill:#BF092F,color:#ffffff,stroke:#7a0420; classDef warn fill:#c4873b,color:#132440,stroke:#8a5a1f; class A,B,O primary; class K,F,W,R secondary; class H,S,Y ok; class X danger;

Figure 2 redraws the request as layers: clients outside the trust boundary, the edge owning the key and entry, the origin deciding what the response means.

Three layers around a shared cache key Two clients with different session cookies reach one edge cache. The key builder includes the URL and selected headers but not the cookie. A stored entry is returned to both clients. The origin renders per request and its response headers decide whether storage happens. One key, one sharing set, three layers Clients (private caches) Alice GET /account session=alice Bob GET /account session=bob Cloudflare edge: shared cache Key builder scheme + host + path + query Origin + forwarding headers Cookie: not included Decision fresh entry? storable response? HIT, MISS, or BYPASS Entry: Alice's HTML TTL 600 s, key includes no cookie Origin (application) Renders per request reads session, tenant, headers, database body may differ by principal Response headers public or private Set-Cookie, Vary these decide storage HIT returns the same bytes to Alice and Bob origin response crosses the storage boundary

The cache makes an equality decision, not a trust decision. Security lives in the key, in storability, or in the application's refusal to vary.

Shared caches also stack. A browser cache reuses a response for one user; a corporate proxy reuses it for a department; an origin reverse proxy reuses it for every request that reaches it; a Worker cache reuses it inside one data center. A fix at the Cloudflare edge does not fix a Varnish layer behind it. Inventory every cache between the principal and the database, and ask each one the same two questions: what is the key, and what makes this response storable?

Unkeyed Inputs Can Change a Cached Representation

An unkeyed input is request data that changes the body but not the key. The common cases are ordinary: a custom header, a cookie, a language preference, a GET body, or a path the edge normalizes differently from the origin.

A header can change the body without changing the key. Take /quote: Alice sends a currency header and gets a dollar total; Bob sends another and should get the euro total. The key is the URL, so Alice's response is stored and Bob receives her figure. No attacker is involved.

RequestHeader sentOrigin would renderKey usedResult under URL-only key
Alice: /quoteX-Currency: USD$100/quoteResponse stored
Bob: /quoteX-Currency: EUR€92/quoteServed Alice's $100

Cache poisoning: one request writes for everyone

Make it reflected and the leak becomes poisoning. A support page prints the X-Client-Name header unescaped. An attacker sends a marker, the origin reflects it, the response is public and cacheable, and the next visitor receives attacker HTML from the edge. One request wrote an entry others read (Avoid web cache poisoning). The precondition is an application reflecting an input the key did not cover.

Cloudflare's guidance is blunt: do not rely on header values that are not in the key, do not reflect untrusted headers, and remember that GET bodies are cached but not keyed; bypass or use POST (Avoid web cache poisoning). The forwarding headers in the default key reduce one classic host-header family, not every header an application reads.

The table splits responsibility. On Free, Pro, and Business the answer is often bypass, because selective key controls are Enterprise-only.

InputIn the default key?Free, Pro, Business controlEnterprise controlFailure if left unkeyed
Query stringYes, the full queryIgnore or sort query string; bypass by rule expressionInclude or exclude specific parametersIgnoring the query merges ?user=alice and ?user=bob into one entry
CookieNoBypass on a cookie name with a rule expressionInclude a cookie name and value in the keyAlice's page is stored and served to Bob; per-session keys destroy hit rate and single-file purge
AuthorizationNoSend private or no-store; bypass the API path; Origin Cache Control is on by defaultBypass or origin no-store; keying on a bearer token is not authorizationA per-token JSON response is reused across tokens when it says public
Custom headerNoCannot add it; bypass the route or stop reflecting itInclude the header in the keyCurrency or tenant mismatch; a reflected header becomes stored XSS
Accept-Language with VaryNo, until Vary is configuredEnable the Cache Rules Vary setting and normalize the headerSame, plus a custom key if neededOne language is served to everyone, or worse, a locale-specific price
GET bodyNo, but the body is cachedMake GET idempotent, bypass, or reject bodiesSame; the body cannot be added to the keyAn attacker's body changes the cached response for later readers
Normalized pathKey uses the normalized URLEnable Normalize URLs to originSameTwo paths share one key while the origin routes them to different content

Figure 3 traces the poisoning path. It succeeds only when the header changes the body, the response is storable, the attacker can prime, and the victim maps to the same key.

Unkeyed Inputs Can Change a Cached Representation
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','activationBorderColor':'#132440','signalColor':'#5a6e82','signalTextColor':'#132440','noteBkgColor':'#c4873b','noteTextColor':'#132440','noteBorderColor':'#132440','labelBoxBkgColor':'#a8dede','labelBoxBorderColor':'#132440','labelTextColor':'#132440','loopTextColor':'#132440','altBackground':'#f8f9fa','fontFamily':'DM Sans, sans-serif'}}}%%
sequenceDiagram
    autonumber
    participant A as Attacker
    participant E as Edge cache
    participant O as Origin
    participant V as Victim
    A->>E: GET /support?q=refund
X-Client-Name: attacker-marker E->>O: forward request, header not in key O-->>E: 200 HTML reflects marker
Cache-Control: public, max-age=600 E->>E: store under /support?q=refund E-->>A: poisoned response V->>E: GET /support?q=refund
no attacker header alt fresh entry exists E-->>V: HIT with attacker-marker in HTML else expired, purged, or not storable E->>O: forward victim request O-->>V: clean HTML end

Those are the preconditions. Remove one and it fails: private removes storability, a different query removes key equality, a key including the header removes the gap. A WAF may inspect the attacker and still let a clean victim read the entry.

Attackers also choose when to prime. A response cached for 600 seconds gives an attacker a 600-second window in which every matching victim reads the poisoned entry. A short TTL reduces the window; it does not remove the bug. Purging is containment, not a fix, because the next request can refill the entry.

Normalization, Cookies, and Authorization

Normalization is where two systems disagree about "the same URL." Cloudflare always collapses adjacent slashes. Normalize incoming URLs runs before rules, WAF, Workers, and Access. Normalize URLs to origin controls what the origin receives and is off by default (URL normalization settings).

That gap is a surface. With incoming on and to-origin off, the edge can key /pricing and /%70ricing as one object while the origin sees two targets. If it routes them differently, one key holds two representations. Cloudflare recommends enabling Normalize URLs to origin with custom keys or device type to keep key and origin aligned and prevent poisoning (Cache keys). All plans.

Vary has the same trap. It is available on all plans, but it is off unless the rule defines it.

Vary normalize is lossy

The Vary setting is off if the vary object is omitted; a wildcard Vary always bypasses. When enabled, each header gets normalize, passthrough, or bypass (Vary). Normalize is lossy: it lowercases, sorts, drops quality values except q=0, strips region variants, and drops values outside an allowlist. Good for Accept-Language; dangerous when the exact value selects a tenant. For generic headers it only combines duplicate lines and trims whitespace; the origin header is not rewritten. Test the exact header the application reads.

Cookies are the identity channel the cache cannot see. The Cookie header is not in the default key, and a Set-Cookie response depends on plan and rule. With Origin Cache Control on and the default level, Cloudflare preserves the header and does not store; an eligible rule with no explicit edge TTL keeps it but still refuses storage, so every request misses; an explicit Edge TTL override strips it and stores. On Enterprise with Origin Cache Control off, the default may cache with the cookie stripped. The header is not portable.

A Vary on Cookie is not a privacy switch. The setting must be enabled, and then it partitions per session: unbounded cardinality, a poor hit ratio, and purge keys the dashboard cannot reproduce. Bypass authenticated routes instead.

Authorization is plan-sensitive, and the edge cannot see token scope. If an API response differs by bearer token, send a private, no-store response or bypass the route.

Figure 4 shows the boundary and the assumption: the key includes what the edge selected; the origin may depend on what the key never saw.

Inputs, key membership, and the representation assumption URL path, Cookie, Authorization, and Accept-Language are shown against one cache key. Path is included; Cookie and Authorization are not; Accept-Language is included only when Vary is configured. The origin representation can therefore differ for requests that share a key. What the key sees, and what the origin sees Request inputs URL path (normalized) Cookie: session=alice Authorization: Bearer ... Accept-Language: en-US Cache key scheme + host + path query + Origin forwarding headers Vary headers only when configured no Cookie, no Authorization Origin representation Alice's name, cart, CSRF token, tenant from the session Bob's name, cart, token, tenant from his session same key, different bytes in key not in key not in key only with Vary key selected origin may differ Assumption to test: same key means same representation. Normalization can collapse distinct inputs into one key.

The PayPal case is the canonical confusion. In 2017 Omer Gil showed that /myaccount/home/stylesheet.css returned the personalized account page because the origin treated the extra segment as the dynamic route while the cache treated .css as static. Reported exposure included names, account balance, and partial card data (Gil, 2017). No header was involved; the path was the unkeyed meaning.

Neither layer can do the other's job. Cloudflare builds the key, applies rules, honors Vary when configured, refuses private and no-store, applies plan-specific cookie behavior, and offers Cache Deception Armor. The application classifies responses, sends correct cache headers, never reflects unkeyed input, authenticates before rendering, normalizes both layers the same way, and tests two principals.

A Small Matrix That Exposes Cache Confusion

A small matrix finds the dangerous cell. Ask: does the key cover every varying input, does the representation vary by principal, and is it storable?

Four cells: key covers and storable is correct partitioning, at cardinality cost; key covers and not storable is safe but idle; key misses and not storable is safe by refusal, at origin cost; key misses and storable is leak or poison. If the representation is invariant, an unkeyed input is harmless but fragile.

Cache confusion: believing the wrong cell

Cache confusion is believing one cell while operating in another. Vary on Cookie assumed to partition, but the Vary setting is off. A private response assumed to protect, but a later Edge TTL override stores it. A .jpg path assumed static, but the origin aliases it to a personalized route and the cache stores HTML.

Deception has four concrete preconditions. The origin aliases a dynamic page under a static path; the cache stores by extension or rule; the victim is authenticated and lured; the attacker can fetch the same URL. Web cache deception uses exactly that shape. Cache Deception Armor breaks the second condition by comparing the extension with Content-Type and refusing a mismatch (Cache Deception Armor). It is available on all plans but must be enabled in a Cache Rule; it depends on Origin Cache Control, has exceptions such as application/octet-stream, and can be overridden by an origin cache header or Edge TTL. It is a mitigation, not proof that the origin's routing is correct.

Over-keying spends hit ratio, origin capacity, and purge simplicity; attacker-controlled headers add arbitrary variants, and per-session keys break single-file purge. Under-keying spends privacy and integrity. Bypass spends origin capacity but is honest. Figure 5 shows the repair.

The matrix is a diagnostic, not a proof. It tells you where to look; it does not tell you which input the origin actually reads. That requires a request trace, a body diff, and a controlled prime-and-probe. A team that fills the matrix from memory has documented its beliefs, not its system.

Before and after a cache-key repair A two-by-two matrix crosses whether the key covers the varying input with whether the response is storable. The URL-only policy leaves the leak-or-poison cell open. The repaired policy either includes the input in the key or refuses storage. Before: URL-only key Rows: key covers the varying input? Columns: response storable? Storable Not storable Covers Misses partitioned, correct cost: variants safe, no reuse cache idle LEAK or POISON same bytes to two principals safe by refusal origin pays repair After: key covers the input, or bypass Rows: key covers the varying input? Columns: response storable? Storable Not storable Covers Bypass partitioned, correct distinct entries safe, no reuse cache idle no shared entry origin always sees request no shared entry same as left Repair A: include the varying input in the key. Repair B: refuse storage for that route. Repair C: stop varying the representation.

Read the status before the body. CF-Cache-Status: DYNAMIC means not eligible at request time; BYPASS means eligible but the response was not cacheable. Age appears on HIT, STALE, and UPDATING, not on DYNAMIC or BYPASS, though an origin Age is proxied. Cache-header precedence runs from the Cloudflare-specific header down to CDN-Cache-Control and then Cache-Control (Cache responses). A body-only test misses the status; a status-only test misses whether the body was personalized.

# Collect status, age, and cache headers for two principals on one route.
for who in alice bob; do
  curl -sS -D "headers-$who.txt" -o "body-$who.html" \
    -H "Cookie: session=$who" \
    https://example.com/account
  printf '%s\n' "--- $who ---"
  grep -Ei '^(HTTP/|cf-cache-status|age|cache-control|vary|set-cookie)' \
    "headers-$who.txt"
done

Analyze a Local Cache-Policy Fixture

A local fixture is a program you control that takes a request, computes a key, renders a representation, and decides whether to store it. It is not a Cloudflare emulator; it is a policy oracle. It makes your assumptions executable and lets you enumerate the matrix before touching a zone. For Enterprise-only controls, the fixture is the honest substitute and must be labeled as a model, not hosted validation.

Make it adversarial: one input in the key, one not; a cache that stores any 200 with public; two principals with distinct markers. Run the same sequence with the URL-only policy and the repaired policy, then diff the results.

Guided exercise

Analyze a Local Cache-Policy Fixture

Execution status: design-only. Not executed. Planning baseline 2026-11-02; documentation re-checked 2026-11-05. No local or hosted run occurred, and no measured result is claimed. Expected observations are acceptance criteria, not findings.

Prerequisites and plan requirements. Node.js 22 LTS or current LTS, a terminal, and a temporary directory. The local part needs no Cloudflare account. The optional confirmation needs a domain on Cloudflare, one proxied DNS record, and an origin you control; the Free plan suffices. Enterprise-only custom header or cookie keys cannot be exercised on Free; model them locally. Use invented principals only, and never prime or probe a domain you do not own.

Minimal setup. Create three files: server.mjs (Node's built-in http module only), policy.json, and run.mjs. The server exposes:

  • GET /assets/app.js: fixed JavaScript, public, max-age=86400.
  • GET /pricing: reads Accept-Language; price=100 for en, price=92 for fr; public, max-age=300; no Vary.
  • GET /account: reads session; returns that name plus a CSRF token; private, no-store.
  • GET /quote: reads X-Currency; total=100 or total=92; public, max-age=600.
  • GET /support: reflects X-Client-Name; public, max-age=600.
  • GET /api/me: requires Authorization: Bearer alice or bob; returns that principal's JSON with public, max-age=600, modeling the unsafe Enterprise case.
  • GET /news and GET /news/anything.jpg: both return the same public HTML (public, max-age=300); the .jpg path sends Content-Type: text/html, the deception alias.

Run the matrix in two passes. Every probe compares what Alice primed with what Bob receives.

StepURL-only policyRepaired policyWhat it proves
/quote: prime USD, probe EURBob gets Alice's $100Bob gets €92An unkeyed header leaks content
/support: prime a marker, probe cleanVictim HTML contains the markerBypass or clean HTMLA reflected header poisons the entry
/pricing: prime en, probe frFrench visitor gets the English priceKey includes the normalized languageLocale is content
/account: Alice, then BobOrigin private forces a bypassThe same bypassIdentity never shares an entry
/api/me: Alice, then BobBob may receive Alice's JSONBypass or a per-token responseAuthorization is not a key
/news/anything.jpgStored text/html under an image URLBypass or 404The deception alias is closed
Re-run the first six after repairThree or more cross-principal resultsZero cross-principal resultsThe policy is internally consistent

Optional hosted confirmation. Deploy the fixture, add a Cache Rule making the support route eligible with a 60-second Edge TTL, prime with the marker, probe without it, and expect a hit, the marker in the body, and a rising age. The probe can use curl -sD -. Delete the rule and purge immediately.

Expected observations. The URL-only run should show at least three cross-principal results: currency, support marker, and locale. The repaired run should show zero. The public asset should move from a miss to a hit with age in both runs; if it does not, the fixture stores nothing and the comparison is meaningless.

Failure checks. All routes bypass proves nothing; an account hit, an age on a personalized response, or a missing set-cookie each point to a different layer. Identical body hashes across principals mean the renderer ignored identity or the key is shared, and a dynamic status on the support route after the rule means the rule did not match.

Cost dimensions. The local run is free: roughly 30 minutes to build and 10 to run. The optional hosted confirmation uses a domain and origin you already have; request volume is negligible and the Free plan suffices. Enterprise custom keys require an Enterprise plan and are design-only here.

Cleanup. Stop the server, delete the directory and both results files, delete the test rule, purge the support and quote routes, remove the test DNS record or origin, and discard the invented sessions and tokens. Confirm the account route bypasses and the public asset still works.

The policy file is the thing under test. Each route maps to a key and a TTL, optionally with extra headers or a bypass, and the runner prints one row per request.

{
  "/quote":   { "key": ["url"], "ttl": 600 },
  "/pricing": { "key": ["url"], "ttl": 300 },
  "/support": { "key": ["url"], "ttl": 600 },
  "/account": { "key": ["url"], "bypass": true }
}
# URL-only run: start the fixture, send the sequence, keep the rows.
node run.mjs > results-url-only.jsonl

# Apply the repaired policy, rerun the same sequence, then diff.
node run.mjs > results-repaired.jsonl
diff results-url-only.jsonl results-repaired.jsonl

The fixture cannot prove Cloudflare's behavior; it proves your policy has no internal contradiction. The optional hosted step is the only part that observes the real edge, and it is deliberately narrow: one route, one rule, one marker, one purge.

Prove the Correct Policy Separates Two Principals

Planned exercise: execution not yet performed. Documentation was verified on 2026-11-05 against the pages below. No local or hosted run occurred, no product version was tested, and no hit ratio, latency, or leak rate is measured.

Pass evidence. For every protected route, send the same request as Alice and Bob and store the full headers plus a body hash. A release candidate passes when:

  • Protected routes return DYNAMIC or BYPASS, carry no Cloudflare age, preserve the set-cookie header, and contain only their own principal's marker.
  • Public routes are byte-identical across principals, move from a miss to a hit, and carry an increasing age.
  • Key coverage shows every body-changing input in the key, from the Rules simulator or trace, or the route bypasses.
  • Deception and API close the alias: the image-extension path bypasses or returns 404, never cached HTML, and the per-token API response is never served from a shared entry.

Fail evidence. Any cross-principal marker, any hit on a personalized route, any age on a personalized response, a missing set-cookie, cached HTML under an image extension, or an authorized JSON response shared across tokens. A pass that occurred only because the origin sent a private header is incomplete: it shows the origin header works, not that the rule or key is correct.

Evidence to keep. One row per request: timestamp, route, principal, key from the simulator or trace, cache status, age, cookie presence, body hash, marker, rule ids, and the response cache header. The body alone is not evidence; the status alone is not evidence. The pair is.

Treat the result as a release gate, not a score. Block on any cross-principal marker, any hit on a personalized route, or any shared authorized response. Warn when a public route stops hitting or when age disappears without a rule change. Observe hit ratio and origin load. Re-run the matrix when a Cache Rule, a Vary setting, an origin header, an authentication flow, or a URL normalization setting changes, because each one can move a route from the safe cell to the leak cell.

Self-check, with explanations.

Why does Vary: Cookie fail to protect a shared page? The Vary setting is off unless the matching Cache Rule defines it, so the cookie may never enter the key. Even when on, it creates one entry per cookie value: unbounded cardinality, a poor hit ratio, and purge keys the dashboard cannot reproduce. Bypass the authenticated route instead.

Why is CF-Cache-Status: DYNAMIC not proof of safety? It means the request was not eligible at request time. That may be a deliberate bypass, a default, or a rule that will be edited later. It does not prove the response is unstorable or that the key excludes the session. Check the rule, the trace, and the response headers, and repeat after any rule change.

Why can two different paths share one cache entry? The key uses the URL Cloudflare normalized, while the origin may receive the original URL when Normalize URLs to origin is off. Baseline normalization, encoded characters, duplicate slashes, and custom keys can all collapse distinct targets. If the origin routes them differently, one key holds two representations; enable normalization to origin and test the exact paths.

Unresolved limitations. The fixture and hosted check cover the edge cache only; browser caches, service workers, origin proxies, Worker caches, and Tiered Cache add their own storage and lifetime decisions. CF-Cache-Status is a signal, not a key dump; the key is visible in the Rules simulator or trace, and even there it reflects the configuration at request time. Cache Deception Armor depends on Origin Cache Control and can be overridden by an origin cache header or an Edge TTL rule. Enterprise-only custom keys, plan-specific set-cookie behavior, and authorization behavior were not executed. Vary normalization is lossy and may change. Prices, limits, and entitlements are dated to 2026-11-05 and must be re-checked before publication. Finally, cache poisoning and web cache deception are attacks on systems you own or are authorized to test; the experiment is limited to invented data on a controlled hostname.

References (verified 2026-11-05):

  • Cloudflare Cache: https://developers.cloudflare.com/cache/
  • Cache keys: https://developers.cloudflare.com/cache/how-to/cache-keys/
  • Cache Rules: https://developers.cloudflare.com/cache/how-to/cache-rules/
  • Cache Rules settings, including Vary: https://developers.cloudflare.com/cache/how-to/cache-rules/settings/
  • Vary: https://developers.cloudflare.com/cache/concepts/vary/
  • Cache responses and CF-Cache-Status: https://developers.cloudflare.com/cache/concepts/cache-responses/
  • Set-Cookie and cache behavior: https://developers.cloudflare.com/cache/concepts/cache-behavior/
  • Origin Cache Control: https://developers.cloudflare.com/cache/concepts/cache-control/
  • Avoid web cache poisoning: https://developers.cloudflare.com/cache/cache-security/avoid-web-poisoning/
  • Cache Deception Armor: https://developers.cloudflare.com/cache/cache-security/cache-deception-armor/
  • URL normalization: https://developers.cloudflare.com/rules/normalization/
  • URL normalization settings: https://developers.cloudflare.com/rules/normalization/settings/
  • Rules simulator: https://developers.cloudflare.com/rules/simulator/
  • RFC 9111, HTTP caching: https://www.rfc-editor.org/rfc/rfc9111.html
  • OWASP, Cache Poisoning: https://owasp.org/www-community/attacks/Cache_Poisoning
  • PortSwigger, Web Cache Deception: https://portswigger.net/web-security/web-cache-deception
  • Omer Gil, Web Cache Deception Attack (2017): https://omergil.blogspot.com/2017/02/web-cache-deception-attack.html