# Private responses cached without Cache-Control

Session-dependent responses with ETag/Last-Modified but no Cache-Control: no-store, readable cross-origin via force-cache

_Area: Web infrastructure and server-side requests. Seen in 3 disclosed reports; latest 2026-06-19. Updated 2026-11-14._

## How it works

A response body depends on the caller's session cookie, but the response carries no `Cache-Control` directive telling the browser not to store it. An `ETag` or `Last-Modified` is enough to make the response a cacheable candidate, so the browser stores it. Cache entries are keyed by URL, not by the cookie that produced them. A later cross-origin request to the same URL can be served the victim's stored private body. The broken assumption is that "the server only returns this to the authenticated user" implies "only that user can read it." The cache sits between them and does not know about the cookie.

## Where it shows up

- Endpoints that vary output on session cookies (profile, lookup, billing, settings) and emit `ETag`/`Last-Modified` but no `Cache-Control: no-store` or `private` [E3](https://bugbountylibrary.com/r/blog%3Aenumerated-wordpress-com-2019-12-24-sop-bypass-via-browser-cache.md).
- A permissive CORS policy on the same endpoints, which would let any origin trigger the cross-origin fetch (inference; E3 observed a CORS wildcard but did not prove it was required for the read).
- Lookup-style JSON APIs returning private fields (email, billing, invite counts, timestamps, encrypted keys) only when a cookie is present [E3](https://bugbountylibrary.com/r/blog%3Aenumerated-wordpress-com-2019-12-24-sop-bypass-via-browser-cache.md).

## How to review

For every endpoint that returns data gated on a cookie, check the response headers. The invariant: **a response whose body differs by session must carry `Cache-Control: no-store` (or `private, no-cache`).** Verify by requesting the endpoint with and without the cookie and diffing the bodies; if they differ, the cache headers must forbid storage. Separately note whether CORS allows a cross-origin caller to read the response at all, since that gates the attack.

## How finders spotted it

- Noticed a CORS wildcard on lookup endpoints, then saw that authenticated lookups of one's own username returned private fields; removing cookies dropped those fields but the response still had an `ETag`, hinting at browser caching; recalled a `fetch` `force-cache` trick to read the cache cross-origin [E3](https://bugbountylibrary.com/r/blog%3Aenumerated-wordpress-com-2019-12-24-sop-bypass-via-browser-cache.md).

## Variants seen

- Private authenticated JSON response cached and read cross-origin via `force-cache` [E3](https://bugbountylibrary.com/r/blog%3Aenumerated-wordpress-com-2019-12-24-sop-bypass-via-browser-cache.md).

## Impact and severity

Cross-origin reads of private data: email, billing, invite counts, timestamps, encrypted PGP key [E3](https://bugbountylibrary.com/r/blog%3Aenumerated-wordpress-com-2019-12-24-sop-bypass-via-browser-cache.md). Severity rises with the sensitivity of the cached fields and with a permissive CORS policy that lets any origin trigger the read [E3](https://bugbountylibrary.com/r/blog%3Aenumerated-wordpress-com-2019-12-24-sop-bypass-via-browser-cache.md).

## Seen in real software
Open-source packages and projects, and products, where this pattern was found. If the target runs one, compare the version it runs with the fix.
- **github.com/0xERR0R/blocky (go)** >= 0.28.0, < 0.32.0, fixed in 0.32.0: Blocky DNSSEC validation bypass and validation-cache scope pollution. Report: https://bugbountylibrary.com/r/ghsa%3AGHSA-x845-2f78-7v36.md

## Evidence
- E1: https://bugbountylibrary.com/r/h1%3A10373.md
- E2: https://bugbountylibrary.com/r/ghsa%3AGHSA-x845-2f78-7v36.md
- E3: https://bugbountylibrary.com/r/blog%3Aenumerated-wordpress-com-2019-12-24-sop-bypass-via-browser-cache.md
