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
- 1Add a Cloudflare Transform Rule to remove CF-Cache-Status from responses.
- 2In Cloudflare Workers, delete the header: response.headers.delete('cf-cache-status')
Code examples
Cloudflare Worker (strip header)
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.
More config checks
- MediumNo Rate-Limit Policy Detected
- MediumVary: Cookie Missing on Cookie-Bearing Response
- LowSet-Cookie Header Exceeds 4 KB
- LowVary Header Missing on Compressed Responses
- InfoDownloadable Content Served as inline
- InfoX-XSS-Protection Header Is Deprecated
- LowServer-Timing Exposes Cache Timings
- LowVary: Cookie on Static Resource
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.