How to fix: X-Cache header reveals CDN cache status
The X-Cache header (e.g., X-Cache: HIT or MISS) is present and reveals CDN caching details.
Why it matters
Cache HIT/MISS status can be used to probe CDN behavior, aid cache poisoning attacks by identifying when poison entries are cached, and reveal which resources are cached by CDN nodes.
X-Cache is an informational header; strip it for sensitive responses.
How to fix it
- 1Configure your CDN to not forward X-Cache to end users
- 2Most CDNs have a header suppression option in their dashboard
Code examples
Nginx
proxy_hide_header X-Cache;
proxy_hide_header X-Cache-Hit;References
Detected automatically by VulnRadar. The check id is x-cache-header, stable across every scan so you can filter or diff on it.
More headers checks
Questions
- How severe is X-Cache header reveals CDN cache status?
- VulnRadar rates this info severity in the headers 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-header, 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.