Insufficient validation of untrusted input in Printing (CVE-2026-9980)
A missing check in the print preview request handler allows a compromised fenced frame renderer to open a tab-modal print preview over the embedder page. This leaks the embedder's URL and title to the fenced frame and lets it control the dialog content, enabling UI spoofing.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 18 days
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 without the Chrome Security team. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A missing fenced frame check in PrintViewManager::RequestPrintPreview allows a compromised fenced frame renderer to trigger a tab-modal print preview over the embedder. This leaks the embedder's URL and title to the fenced frame and grants it a PrintPreviewUI remote, enabling UI spoofing.
Affected files:
chrome/browser/printing/print_view_manager.ccchrome/browser/ui/webui/print_preview/print_preview_handler.ccchrome/browser/printing/print_view_manager_base.cc
Estimated timestamp from git blame: 2024-04-24
Summary
A vulnerability in the printing::mojom::PrintManagerHost::RequestPrintPreview Mojo handler potentially allows a compromised fenced-frame renderer to bypass isolation guarantees. By sending a crafted request, an attacker can trigger a tab-modal print preview dialog over the embedder page. This leads to the disclosure of the embedder's top-level URL and title to the fenced frame, as well as granting the fenced frame a PrintPreviewUI remote to control the dialog's content.
Root Cause Analysis
In chrome/browser/printing/print_view_manager.cc, the RequestPrintPreview method and its callback OnRequestPrintPreviewCallback lack a check to ensure the requesting RenderFrameHost is not nested within a fenced frame.
While sibling methods such as SetupScriptedPrintPreview (used for window.print()) and PrintViewManagerBase::ScriptedPrint explicitly call rfh->IsNestedWithinFencedFrame() and reject requests from such frames with a bad_message, RequestPrintPreview does not perform this check.
Because fenced frames share the outer WebContents via the MPArch implementation, the PrintManagerHost interface (bound for all frames in ChromeContentBrowserClient::RegisterAssociatedInterfaceBindersForRenderFrameHost) allows a fenced-frame renderer to reach the PrintViewManager of the embedder's WebContents. When a compromised fenced-frame renderer sends a RequestPrintPreview message with webnode_only = true, the browser proceeds to open a tab-modal chrome://print dialog over the embedder.
Information Disclosure and UI Spoofing
Once the print preview dialog is initialized, the chrome://print WebUI invokes PrintPreviewHandler::HandleGetPreview in chrome/browser/ui/webui/print_preview/print_preview_handler.cc.
This handler retrieves the initiator (the embedder's WebContents) and fetches the active print preview frame via PrintViewManager::FromWebContents(initiator)->print_preview_rfh(). Because the attacker passed webnode_only = true in their request, print_preview_rfh_ points to the fenced frame's RenderFrameHost.
The handler then reads the initiator's title and URL to populate the preview settings if headers/footers are enabled (the default). These sensitive settings are sent back to the fenced frame via the PrintRenderFrame::PrintPreview(settings) Mojo call.
Furthermore, the handler binds a PrintPreviewUI remote to the fenced frame via print_render_frame_->SetPrintPreviewUI(...). This grants the attacker the ability to provide arbitrary PDF bytes (via MetafileReadyForPrinting) to be displayed in the preview pane, successfully spoofing a print UI over the embedder origin.
Impact
- Information Disclosure: The embedder page's top-level URL and title are leaked to the fenced-frame renderer, violating the Privacy Sandbox guarantee that fenced frames cannot learn about their embedding environment.
- UI Spoofing: A compromised renderer can display attacker-supplied content within a trusted browser dialog (
chrome://print) shown as a tab-modal UI over the embedder origin.
Suggested Steps to Reproduce
Note: These are theoretical steps as our tooling agent cannot execute code.
- A victim visits a page that embeds an attacker-controlled
<fencedframe>. - The attacker achieves arbitrary code execution within the sandboxed renderer process of the fenced frame.
- From the compromised renderer, request the associated interface
printing::mojom::PrintManagerHoston the fenced frame'sLocalFrame. - Send a
RequestPrintPreviewmessage on this remote withwebnode_only = true. - Observe that a tab-modal
chrome://printdialog opens over the embedder tab. - The compromised renderer will receive the
PrintPreviewmessage containing the embedder's URL and title, along with aPrintPreviewUIremote that can be used to control the dialog content.
Suggested Fix
Add an IsNestedWithinFencedFrame() check to PrintViewManager::RequestPrintPreview (similar to SetupScriptedPrintPreview) to terminate the renderer if a request is received from a fenced frame.
void PrintViewManager::RequestPrintPreview(
mojom::RequestPrintPreviewParamsPtr params) {
content::RenderFrameHost* rfh = GetCurrentTargetFrame();
if (rfh->IsNestedWithinFencedFrame()) {
bad_message::ReceivedBadMessage(
rfh->GetProcess(), bad_message::PVM_SCRIPTED_PRINT_FENCED_FRAME);
return;
}
// ... existing code ...
}
Evaluated with Chrome root at commit: eca8648a4e1cdfdda68c495a6003059fed641955
Results 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.
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
The `RequestPrintPreview` method lacks a check to ensure the requesting frame is not nested within a fenced frame, unlike sibling methods that perform this check.
Impact
The embedder's top-level URL and title are leaked to the fenced frame, and the attacker can spoof a trusted print dialog over the embedder origin.
What the attacker needed
Victim visits a page with an attacker fenced frame; attacker achieves code execution in the fenced frame…
The fix
Add an `IsNestedWithinFencedFrame()` check to `PrintViewManager::RequestPrintPreview` to reject requests from fenced frames.
How it was found
- A victim visits a page that embeds an attacker-controlled fenced frame.
- The attacker achieves arbitrary code execution within the sandboxed renderer process of the fenced frame.
- From the compromised renderer, request the associated interface `printing::mojom::PrintManagerHost` on the fenced frame's `LocalFrame`.
- Send a `RequestPrintPreview` message on this remote with `webnode_only = true`.
- Observe that a tab-modal `chrome://print` dialog opens over the embedder tab.
- The compromised renderer receives the `PrintPreview` message containing the embedder's URL and title, along with a `PrintPreviewUI` remote that can be used to control the dialog content.
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.
A fenced frame is a special web page container that is supposed to be isolated from the page that embeds it. The print preview feature did not check whether a request came from inside such a container, so a malicious page inside it could open a print dialog over the main page and learn its address and title. It could also put its own content into that trusted dialog.
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.