Cache Control: An Easy P4 Vulnerability
The article describes a hypothetical vulnerability where an authenticated account page is served with a public cache-control header, allowing sensitive data to be cached and potentially retrieved after logout. The author claims this could expose user data to unauthorised parties.
medium.com
Published on medium.com
Click here to Read Free
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
Sensitive account data could be exposed through browser or proxy caches, potentially allowing unauthorised access after logout.
What the attacker needed
Victim uses a shared or public device; attacker has access to the same browser or proxy cache
The fix
Authenticated pages should be served with cache-control headers that prevent storage, such as no-store, no-cache, and must-revalidate.
How it was found
- Log in to the account page.
- Open the browser developer tools and go to the Network tab.
- Refresh the page and inspect the response headers.
- If the page is cached, log out and try accessing the cached version from browser history.
- If sensitive data is still visible after logging out, the vulnerability is confirmed.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Websites use cache headers to tell browsers and proxies whether to store a copy of a page. If a page with private information is marked as publicly cacheable, someone else using the same device or network might later see that stored copy. This article explains how to check for that mistake.
What is Cache bugs?
A cache and the origin disagree about a request, so a poisoned response is served to everyone or a private page is stored as public.