Skip to content
Cache bugs Disclosed report Intermediate CVE-2025-10536

Cache-Control: no-store does not prevent disk cache entry when multiple headers are sent

Firefox only honours the last of several separate Cache-Control response headers, so a response carrying no-store followed by no-cache is written to the disk cache. A response that the server intended never to be stored, including one setting a session cookie, can therefore persist on disk across browser restarts.

Ibuki Sato Follow

Originally disclosed on Mozilla

  • Fixed in 15 days
  • Paid in 21 days
  • Disclosed after 15 days

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36

Steps to reproduce:

1.Start a local HTTP server using the attached server.py (Flask).

2.Navigate to http://localhost:8082/test7 in Firefox.

3.This endpoint responds with three separate Cache-Control headers:

・Cache-Control: no-store ・Cache-Control: public ・Cache-Control: no-cache

4.Open about:cache.

5.Observe that an entry for /test7 appears in the disk cache.

6.This occurs despite no-store being present.

7.The response also includes a Set-Cookie: sessionid=test_token header.

firefox 141.0.2(64bit) Windows 11 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0

Actual results:

Firefox appears to honor only the last Cache-Control header.

If no-cache follows no-store, no-store is ignored.

The response ends up being cached.

The cache entry persists across browser restarts.

Expected results:

According to [RFC 9111 (Section 5.2.2.5)]the no-store directive prohibits intentional storage in non-volatile storage (e.g., disk), and instructs caches to make a best-effort attempt to avoid retaining the information even in volatile memory (e.g., RAM).

Thus, when a server sends Cache-Control: no-store, the browser:

  • MUST NOT store the response in disk cache (non-volatile).
  • SHOULD avoid memory caching, or at least remove the response from memory promptly.
  • MUST correctly process multiple Cache-Control headers and not ignore no-store even when combined with other directives.

Therefore, when multiple Cache-Control headers are present (e.g., no-store and no-cache), the browser should combine them appropriately and enforce the most restrictive directive — which is no-store in this case.

Even when multiple Cache-Control headers are sent separately, the browser should merge them and respect the most restrictive directive, i.e., no-store.

The original report as published on Mozilla's Bugzilla, by Ibuki Sato. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the cache code parses only the final Cache-Control header instead of merging all of them and applying the most restrictive directive.

Impact

A response the server marked as never to be stored, including one that sets a session cookie, may be written to disk and survive browser restarts, so anyone with access to the machine could later read it.

What the attacker needed

Server sends multiple Cache-Control headers; victim uses Firefox; local access to the disk cache

The fix

The browser should merge all Cache-Control headers and enforce the most restrictive directive, treating no-store as dominant.

How it was found

  1. Run a local Flask server that returns three separate Cache-Control headers on one endpoint.
  2. Open that endpoint in Firefox.
  3. Open about:cache and look at the disk cache.
  4. See that an entry for the endpoint exists despite no-store being sent.

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 report has not been written yet. The Original tab links to the source.

When a website sends a response, it can attach instructions called headers that tell the browser whether it may save a copy. One instruction, no-store, means 'never save this'. The report shows that if the server sends several of these instruction headers, Firefox only reads the last one, so the 'never save' instruction gets lost and the page is saved to disk anyway.

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.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Web cache poisoning and deception

The lesson behind this report.

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.