Observable discrepancy in Navigation (CVE-2026-87516)
A cross-origin site can use the browser's history length as an oracle to confirm the URL of an iframe that failed to load due to framing protections. By navigating the iframe to a guessed URL and checking whether the history entry was replaced, an attacker can detect sensitive post-redirect URLs.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 4 months
Project Fortify, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A security bypass in the history replacement logic for error documents allows cross-origin sites to use history.length as a URL-equality oracle. This enables attackers to detect sensitive post-redirect URLs of iframes blocked by security headers like X-Frame-Options or CSP.
Affected files:
content/browser/renderer_host/navigation_request.cccontent/browser/renderer_host/render_frame_host_impl.cccontent/renderer/render_frame_impl.cccontent/browser/renderer_host/navigation_controller_impl.cccontent/browser/renderer_host/ancestor_throttle.cc
Estimated timestamp from git blame: 2021-06-30
Summary
Chromium's logic for determining whether a navigation should replace the current history entry contains a potential security exemption for error documents that can be exploited for information disclosure. This bypass allows a cross-origin attacker to use window.history.length as an oracle to confirm the URL of a frame that failed to load (e.g., due to X-Frame-Options or Content-Security-Policy).
Potential Mechanism
In content/browser/renderer_host/navigation_request.cc, the method ShouldReplaceCurrentEntryForSameUrlNavigation determines if a navigation to the same URL as the current document should replace the existing history entry. A security check was previously added to this method to prevent cross-origin sites from guessing a frame's URL by observing history length changes (crbug.com/1208614). However, this check is currently bypassed if the current document is an error page:
// content/browser/renderer_host/navigation_request.cc:11052
if (!frame_tree_node_->current_frame_host()->IsErrorDocument() &&
common_params_->initiator_origin &&
!common_params_->initiator_origin->IsSameOriginWith(
frame_tree_node_->current_origin())) {
return false;
}
When IsErrorDocument() is true, a cross-origin initiator (like attacker.com) can potentially trigger a same-URL navigation that replaces the history entry instead of pushing a new one. For error documents, the browser compares the navigation URL against the URL that failed to load (stored as the 'unreachable URL').
Potential Impact
An attacker can potentially leak sensitive, user-specific URLs that result in error pages. For example, a redirect from https://victim.com/dashboard to https://victim.com/u/secret-id which is then blocked by X-Frame-Options: DENY will commit an error document at the secret URL. The attacker can then:
- Measure the initial
window.history.lengthof the tab. - Navigate the iframe to a guessed URL (e.g.,
https://victim.com/u/guess). - If
history.lengthdoes not increase, the guess is confirmed as the secret URL (history entry was replaced). - If
history.lengthincreases, the guess was likely incorrect.
Suggested Potential Steps to Reproduce
- Identify a victim site (e.g.,
victim.com) that redirects a generic URL to a user-specific one and blocks framing viaX-Frame-Options: DENYorCSP: frame-ancestors 'none'. - On an attacker-controlled site, embed the victim's generic URL in an
<iframe>. - The browser process blocks the response and commits an error page in the iframe. The internal
last_committed_url_of the frame is set to the sensitive post-redirect URL. - The attacker script records the current
window.history.lengthof the tab. - The attacker script programmatically sets
iframe.srcto a candidate guess URL. - The attacker checks if
window.history.lengthhas remained constant, which indicates a successful guess via the replacement oracle.
Note: These are potential steps based on code analysis; our current tooling has not yet executed this proof-of-concept.
Proposed Fix
Remove the !frame_tree_node_->current_frame_host()->IsErrorDocument() exemption in NavigationRequest::ShouldReplaceCurrentEntryForSameUrlNavigation. Cross-origin initiators should not be permitted to trigger history entry replacement, regardless of whether the current document is an error page, to prevent this side-channel side-channel oracle.
Evaluated with Chrome root at commit: b3153093eb3c78c3e88ccf562bcbc20437a04b0e
Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:
- If you are familiar with the severity guidelines, you may adjust the severity.
- If this is a false positive, and there's no work to be done, please close as WAI.
- If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.
Data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.
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 history replacement logic exempts error documents from a cross-origin check, so a cross-origin initiator can replace the history entry when navigating to the same URL as the failed document.
Impact
An attacker could leak sensitive, user-specific URLs that result in error pages, but the report notes the proof-of-concept has not been executed.
What the attacker needed
Victim site redirects to a secret URL; victim site blocks framing; attacker can embed victim URL in iframe
The fix
The exemption for error documents in the history replacement check should be removed so cross-origin initiators cannot trigger history entry replacement.
How it was found
- Find a victim site that redirects a generic URL to a user-specific URL and blocks framing with X-Frame-Options or CSP.
- On an attacker site, embed the victim's generic URL in an iframe.
- The browser blocks the response and commits an error page, setting the frame's internal last committed URL to the sensitive post-redirect URL.
- Record the current window.history.length of the tab.
- Set the iframe's src to a candidate guess URL.
- Check whether window.history.length stayed the same, which indicates a successful guess.
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 blocks another site from embedding it in a frame, the browser shows an error page instead. This report says an attacker can still learn the secret web address of that error page by watching whether the browser's back-button history grows or stays the same. It is like guessing a password and getting a tiny clue from how the browser behaves.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.