Inappropriate implementation in BFCache (CVE-2025-5281)
A page with a no-cache header and cookies that change on logout remained in the back/forward cache when the Speculation Rules API was enabled, so pressing the back button after logging out still showed the secret content. An attacker could potentially view sensitive information after a user logs out.
Originally disclosed on Chrome VRP
- Fix shipped in 16 days
Security Bug
Important: Please do not change the component of this bug manually.
Please READ THIS FAQ before filing a bug: https://chromium.googlesource.com/chromium/src/+/HEAD/docs/security/faq.md
Please see the following link for instructions on filing security bugs: https://www.chromium.org/Home/chromium-security/reporting-security-bugs
Reports may be eligible for reward payments under the Chrome VRP: https://g.co/chrome/vrp
NOTE: Security bugs are normally made public once a fix has been widely deployed.
VULNERABILITY DETAILS
Normally bfcache is cleared on pages with a Cache-Control: no-cache header when cookies change.
See https://developer.chrome.com/docs/web-platform/bfcache-ccns for details.
However, it seems like the Speculation Rules Api conflicts with this mechanism, causing pages to remain cached after logging out from a site for example.
VERSION
Chrome Version: 123.0.6300.0 (Developer Build) (arm64)
Operating System: macOS 15.4.1 (24E263)
A bisect gives the following info:
You are probably looking for a change made after 1260232 (known good), but no later than 1260262 (first known bad).
CHANGELOG URL: https://chromium.googlesource.com/chromium/src/+log/57c9ed1ccc03628d9088996ad57899deec1a4aee..29c4db2dad1378977a2334ffd62e0a8876677ace
And this commit seems to be the most likely culprit, it is the only one touching bfcache as far as I can tell: https://chromium.googlesource.com/chromium/src/+/9ec5a4888be7a555a95aeb7d88cc7bb603a9f0ca
REPRODUCTION CASE
First let's check the expected behavior
- Visit https://bfcache-speculation-rules.deno.dev/
- Click the Login button
- Click Home
- Click View the secret page
- Click Logout
- Click the browser back button
Observe how the page now shows 'Access restricted', as expected since the user has been logged out.
Now for the actual behavior with speculation rules enabled
- Visit https://bfcache-speculation-rules.deno.dev/
- This time, make sure speculation rules are enabled (click Toggle speculation rules)
- Click the Login button
- Click Home
- Click View the secret page
- Click Logout
- Click the browser back button
This time, the secret content is still visible, presumably due to bfcache showing the cached content. Only after refreshing the page will it show the 'Access restricted' message.
CREDIT INFORMATION
Externally reported security bugs may appear in Chrome release notes. If this bug is included, how would you like to be credited?
Reporter credit: Jesper van den Ende - Pelican Party Studios
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
Impact
After logging out, a user could still see previously restricted content by pressing the back button, potentially exposing sensitive information to someone with access to the same browser.
What the attacker needed
Speculation Rules API enabled; User logs out of a site; Attacker has access to the same browser session
How it was found
- Visit the test page and enable speculation rules.
- Click Login, then Home, then View the secret page.
- Click Logout.
- Click the browser back button.
- Observe that the secret content is still visible.
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 you log out of a website, your browser should forget the private page you were on. But here, a browser feature that keeps pages ready for quick back-button navigation (called bfcache) kept the private page in memory even after logout, so pressing back showed it again. This only happened when another feature, Speculation Rules, was turned on.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.