Skip to main content
InfoConfig

How to fix: CF-Cache-Status Exposes Cloudflare Cache State

The CF-Cache-Status header (HIT/MISS/DYNAMIC/BYPASS/EXPIRED/REVALIDATED) is present on responses, confirming Cloudflare usage and revealing edge cache behavior.

Why it matters

Confirms Cloudflare as the CDN provider, helping attackers target Cloudflare-specific misconfigurations. Cache state values can also assist in cache poisoning reconnaissance (identifying which paths are cached vs. dynamic).

CF-Cache-Status is added by Cloudflare to every response to indicate how it was served from the edge cache. While useful for operators debugging cache behavior, it provides no value to end users and reveals infrastructure details.

How to fix it

  1. 1Add a Cloudflare Transform Rule to remove CF-Cache-Status from responses.
  2. 2In Cloudflare Workers, delete the header: response.headers.delete('cf-cache-status')

Code examples

Cloudflare Worker (strip header)

JavaScript
export default {
  async fetch(request, env) {
    const response = await fetch(request);
    const newResponse = new Response(response.body, response);
    newResponse.headers.delete('cf-cache-status');
    return newResponse;
  },
};

References

Detected automatically by VulnRadar. The check id is x-cache-status-cloudflare, stable across every scan so you can filter or diff on it.

See every config check

Questions

How severe is CF-Cache-Status Exposes Cloudflare Cache State?
VulnRadar rates this info severity in the config category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
Does VulnRadar check for this automatically?
Yes. It runs as part of every scan under the check id x-cache-status-cloudflare, which stays the same between runs so you can filter, diff, or gate CI on it.

Missing a check?

The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.

Propose a checkHow a check is built

Scan your own site for cf-cache-status exposes cloudflare cache state

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

CF-Cache-Status Exposes Cloudflare Cache State | VulnRadar