Skip to content

Prevent Cross-Tenant CDN Cache Leaks

Classify authenticated responses before an edge cache can store them.

An edge cache sits before the application that knows the caller's role. If an authenticated response is cached under a shared URL, the next request may receive it without running authorization. This is different from an application cache-key problem: the CDN may never see the application's tenant or session state. Treat the cache policy as part of the access boundary.

Classify each response

List route families, not just one example URL. For each, decide whether the body is public, tenant-specific, user-specific, or secret-bearing. Then record the cache rule and an observable test.

Response classDefault treatmentTest
Public static assetShared caching can be allowedSame bytes for all callers
Public page with private fragmentSplit private fetch from cached shellNo private bytes in HTML
Tenant dashboardDo not use a shared cache without a proven variant keyA and B markers never cross
Account or export pagePrivate or no-store as neededEdge never serves another user
Signed downloadEvaluate link capability and expiry separatelyExpired link fails at edge and origin

Inspect response headers from the deployed edge path, not only the origin. Verify that cookies, authorization headers, URL parameters, and vary rules have the intended effect. A private cache directive can still leave earlier cached objects until purged, so include migration behavior when changing policy.

Use synthetic A and B sessions in a controlled environment. Warm a route as A, request it as B, then repeat in reverse order. Check edge hit/miss metadata and response body markers. Include logged-out requests and stale-while-revalidate behavior if used. A successful origin authorization test does not cover this path.

Check old edge objects

Deploy the new rule after warming an old edge object with synthetic data. Purge or version the object, then confirm the edge no longer serves the stale private response.

The OWASP ASVS provides a verification frame for web services, while OWASP multi-tenant guidance makes the isolation goal explicit. This response-class policy is the artifact. It should be reviewed whenever a new CDN rule or framework cache feature is added. Do not test third-party edges without written scope.

Find the gaps in your access controls

See how an illustrative cross-workspace finding connects evidence, impact and a fix. Discuss the tenant boundaries your team needs reviewed.

Sources

  1. OWASP Multi Tenant Security Cheat SheetAccessed
  2. OWASP Application Security Verification Standard 5.0Accessed