Incorrect authorization in Loader (CVE-2026-79051)
The Navigation API's intercept() method incorrectly treats a cross-origin initiator as same-origin during same-document navigations, and a text-fragment token from an earlier trusted load persists. An attacker could use this to trigger text-fragment matching on a cross-origin page and observe side effects to learn whether specific text exists.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 3 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: The Navigation API's intercept() method incorrectly 'launders' a cross-origin initiator's origin into a trusted same-origin context during same-document navigations. This allows an attacker to bypass Scroll-to-Text-Fragment security restrictions, potentially enabling cross-origin information leaks.
Affected files:
third_party/blink/renderer/core/loader/document_loader.ccthird_party/blink/renderer/core/navigation_api/navigate_event.ccthird_party/blink/renderer/core/fragment_directive/text_fragment_anchor.ccthird_party/blink/renderer/core/navigation_api/navigation_api.cc
Estimated timestamp from git blame: 2021-04-23
Summary
A potential vulnerability in Blink's Navigation API allows a cross-origin attacker to bypass security restrictions for Scroll-to-Text-Fragment (STTF). By using navigation.intercept() during a same-document navigation (e.g., a hash change), the initiator of the navigation is incorrectly treated as same-origin. This 'initiator laundering' bypasses the security logic in TextFragmentAnchor, allowing an attacker to trigger text-fragment matching and its associated side effects (like expanding <details> elements) that would normally be blocked for cross-origin initiators.
Technical Details
The vulnerability arises from the interaction between the Navigation API and DocumentLoader during an intercepted same-document navigation:
- Initiator Laundering: When a navigation is intercepted via
event.intercept(), the commit process eventually callsDocumentLoader::RunURLAndHistoryUpdateSteps. This method invokesUpdateForSameDocumentNavigationbut hardcodes theinitiator_originas the frame's own origin (frame_->DomWindow()->GetSecurityOrigin()), effectively overwriting the actual cross-origin initiator. (Seethird_party/blink/renderer/core/loader/document_loader.cc:1029). - Trusted Initiator State: As a result, the
last_navigation_had_trusted_initiator_flag inDocumentLoaderis set totrue. This flag is the primary signal used byTextFragmentAnchor::CheckSecurityRestrictionsto determine if cross-origin restrictions (e.g., blocking STTF in cross-origin iframes or popups) should be applied. - Token Persistence: For same-document navigations intercepted by the Navigation API,
DocumentLoader::UpdateForSameDocumentNavigationskips the logic that would normally regenerate or clear thehas_text_fragment_token_flag (seedocument_loader.cc:1108). This allows a token granted during an earlier trusted load (e.g., a user-activatedwindow.open()) to persist and be consumed by the attacker-controlled navigation. - Security Bypass: When the intercept handler resolves,
NavigateEvent::ProcessScrollBehaviorcreates aTextFragmentAnchor. The security checks inTextFragmentAnchor::CheckSecurityRestrictionspass because they find a valid token and a (laundered) trusted initiator.
Impact
While scrolling might be blocked, the side effects of text-fragment matching still occur. These include:
- Searching the victim's DOM for attacker-specified text.
- Automatically expanding
<details>elements orhidden=until-foundregions containing the text. - Firing
beforematchevents.
An attacker can observe these side effects (e.g., through layout changes or timing attacks) to determine if specific text exists on a cross-origin page, leading to an XS-Leak (Cross-Site Leak).
Potential Reproduction Steps (Suggested)
- A victim page registers a navigation listener:
navigation.addEventListener('navigate', e => { if (e.canIntercept) e.intercept({handler: async () => {}}); });. - An attacker page opens the victim page in a popup with user activation:
const w = window.open('https://victim.example/');. This grants the initial text fragment token. - The attacker triggers a same-document navigation to a text fragment:
w.location.replace('https://victim.example/#:~:text=SECRET');. - The victim's
navigateevent listener intercepts the navigation. - Due to the laundering bug, the STTF logic executes, revealing whether 'SECRET' exists on the page via observable side effects.
Suggested Fix
- Preserve Initiator: Modify
NavigateEventDispatchParamsto store and preserve the originalinitiator_originfrom the navigation request. - Update Commit Logic: Update
DocumentLoader::RunURLAndHistoryUpdateStepsto accept aninitiator_originparameter, and ensure the Navigation API passes the preserved origin during commit. - Manage Tokens: Ensure
UpdateForSameDocumentNavigationcorrectly clears or updateshas_text_fragment_token_for all same-document navigation types, including those intercepted by the Navigation API, if they are initiated from a cross-origin context.
Note: These findings and reproduction steps are based on a source code analysis; no automated proof of concept has been executed.
Evaluated with Chrome root at commit: 1a8d40fc44df2088d5945c0bf53584038aa1614a
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 commit path for intercepted same-document navigations hardcodes the initiator origin as the frame's own origin and skips clearing the text-fragment token, so the security check sees a trusted same-origin initiator.
Impact
An attacker could observe side effects such as layout changes or timing to determine whether specific text exists on a cross-origin page, though scrolling itself might be blocked.
What the attacker needed
Victim page intercepts navigations; attacker opens victim in popup with user activation; victim page contains target text
The fix
The suggested fix is to preserve the original initiator origin through the navigation event and commit logic, and to clear or update the text-fragment token for cross-origin same-document navigations.
How it was found
- The victim page registers a navigate listener that intercepts navigations.
- The attacker page opens the victim page in a popup with user activation, granting an initial text fragment token.
- The attacker triggers a same-document navigation to a text fragment on the victim page.
- The victim's navigate listener intercepts the navigation.
- The text-fragment logic runs and reveals whether the specified text exists via observable side effects.
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 page opens another page in a popup, the browser normally restricts what the first page can do to the second. This report says a browser feature meant to let pages handle their own navigation can accidentally make the browser think the navigation came from the same site, so those restrictions are skipped. That could let an attacker find out whether certain text appears on another site's page.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.