Skip to content
Access control Advisory Advanced CVE-2026-87442

Confused deputy in Prerender (CVE-2026-87442)

A logic flaw in PrerendererImpl::MaybePrerender causes prefetches to be attributed to the primary main frame instead of the correct RenderFrameHost when the document is in the Back/Forward Cache. A compromised renderer can exploit this origin confusion to bypass cross-site prefetch isolation and issue credentialed GET requests, including SameSite=Strict cookies, to a victim site.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 5 months

Project Fortify, an experimental security project, has identified the following potential security issue.

Overview: PrerendererImpl::MaybePrerender can incorrectly attribute prefetches to the primary main frame instead of its own RenderFrameHost when the document is in the Back/Forward Cache. If triggered by a compromised renderer, this origin confusion allows an attacker to bypass cross-site prefetch isolation, potentially issuing credentialed GET requests (including SameSite=Strict cookies) to a victim site.

Affected files:

  • content/browser/preloading/prerenderer_impl.cc
  • content/browser/preloading/anchor_element_interaction_host_impl.cc

Estimated timestamp from git blame: 2024-10-10

Summary

A logic flaw exists in the prefetching implementation for speculation rules where PrerendererImpl incorrectly uses the primary main frame's context instead of the context associated with its own RenderFrameHost. When a page is moved to the Back/Forward Cache (BFCache), a compromised renderer can still trigger preloading actions via IPC. Due to this origin confusion, the browser misattributes the prefetch to the currently active page. This allows an attacker to bypass cross-site prefetch isolation and issue credentialed GET requests to the victim's site.

Prerequisite: The kPrerender2FallbackPrefetchSpecRules feature must be enabled.

Technical Details

When a prerender is triggered as a fallback for speculation rules, PrerendererImpl::MaybePrerender is called. In content/browser/preloading/prerenderer_impl.cc, the code retrieves a PrefetchDocumentManager to initiate a prefetch:

C++
auto* prefetch_document_manager =
    content::PrefetchDocumentManager::GetOrCreateForCurrentDocument(
        web_contents->GetPrimaryMainFrame());

The use of web_contents->GetPrimaryMainFrame() is problematic. If the PrerendererImpl instance belongs to a RenderFrameHost that has been moved to the BFCache, GetPrimaryMainFrame() will return the current active main frame of the WebContents, which belongs to the newly navigated origin.

The attack path proceeds as follows:

  1. IPC Trigger: A compromised renderer for a BFCached Document A (attacker.com) sends a blink.mojom.AnchorElementInteractionHost::OnPointerDown message for a URL on Document B (victim.com).
  2. Missing Lifecycle Check: AnchorElementInteractionHostImpl::OnPointerDown and PreloadingDecider lack an IsActive() or !IsInLifecycleState(kInBackForwardCache) check, allowing the IPC to be processed.
  3. Origin Confusion: PrerendererImpl::MaybePrerender (associated with Document A) is called. It fetches the PrefetchDocumentManager for Document B (the current primary main frame).
  4. Spoofed Request: PrefetchRequest::CreateRendererInitiated uses Document B's render_frame_host() as the initiator, setting the referring_origin_ to victim.com.
  5. Isolation Bypass: Because the referring_origin_ (victim.com) matches the target URL (victim.com/sensitive), PrefetchRequest::IsCrossSiteRequest returns false.
  6. Credentialed Request: The browser treats the prefetch as same-site, bypassing the kUserHasCookies rejection logic in PrefetchService. It uses the default network context, attaching the user's cookies for victim.com (including SameSite=Strict cookies).

Impact

An attacker with a compromised renderer can potentially trigger blind, credentialed GET requests to arbitrary URLs on a victim's site. While the attacker cannot read the response, this can be used for CSRF-like attacks against sensitive state-changing GET endpoints. The bypass of SameSite=Strict and cross-site isolation significantly increases the severity of this issue.

Suggested Steps to Reproduce

Note: These are potential steps based on code analysis; our tooling cannot execute this exploit directly.

  1. Host a malicious page at attacker.com (Document A).
  2. From Document A, register a speculation rule (action: "prerender") for a sensitive URL on victim.com.
  3. Navigate the tab from attacker.com to victim.com (Document B). Document A enters the BFCache.
  4. Simulate a compromised renderer for Document A by sending a blink.mojom.AnchorElementInteractionHost::OnPointerDown message for the victim.com URL over its Mojo pipe.
  5. Observe that a prefetch for the victim.com URL is issued, using Document B's origin as the referrer, and that a credentialed GET request is sent to victim.com with Document B's cookies.

Proposed Fix

  1. Lifecycle Validation: Add IsActive() checks to AnchorElementInteractionHostImpl IPC handlers (similar to SpeculationHostImpl::ValidateFrameState) to drop preloading messages from inactive or BFCached frames.
  2. Fix Origin Confusion: In PrerendererImpl::MaybePrerender, retrieve the PrefetchDocumentManager using the PrerendererImpl's own render_frame_host_ instead of web_contents->GetPrimaryMainFrame().
    C++
    auto* prefetch_document_manager =
        content::PrefetchDocumentManager::GetOrCreateForCurrentDocument(&render_frame_host_.get());
    

Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0


Results from so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; 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.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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 code uses web_contents->GetPrimaryMainFrame() to get the PrefetchDocumentManager, which returns the active main frame instead of the frame associated with the PrerendererImpl, causing origin confusion when the frame is in BFCache.

Impact

An attacker with a compromised renderer can potentially trigger blind, credentialed GET requests to arbitrary URLs on a victim's site, bypassing SameSite=Strict and cross-site isolation, which could be used for CSRF-like attacks against sensitive state-changing GET endpoints.

What the attacker needed

Compromised renderer; [redacted] enabled; victim visits attacker page then victim site

The fix

The issue should be fixed by adding IsActive() checks to AnchorElementInteractionHostImpl IPC handlers and by retrieving the PrefetchDocumentManager using the PrerendererImpl's own render_frame_host_ instead of web_contents->GetPrimaryMainFrame().

How it was found

  1. Host a malicious page at attacker.com (Document A).
  2. From Document A, register a speculation rule (action: "prerender") for a sensitive URL on victim.com.
  3. Navigate the tab from attacker.com to victim.com (Document B). Document A enters the BFCache.
  4. Simulate a compromised renderer for Document A by sending a blink.mojom.AnchorElementInteractionHost::OnPointerDown message for the victim.com URL over its Mojo pipe.
  5. Observe that a prefetch for the victim.com URL is issued, using Document B's origin as the referrer, and that a credentialed GET request is sent to victim.com with Document B's cookies.

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 is put into the browser's back/forward cache, it is kept in memory but not active. A security check in the browser's prefetching code mistakenly uses the active page's identity instead of the cached page's identity. This lets a malicious page, if it can run code in the browser, make requests to another site as if they came from that site, potentially with the user's cookies.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.