Skip to content
IDOR Advisory Advanced CVE-2026-17679

Insufficient validation of untrusted input in Print Preview (CVE-2026-17679)

The chrome-untrusted://print/ handler fetches stored PDF preview data using only a small sequential integer ID, with no check that the requesting frame owns that preview. A compromised chrome-untrusted renderer could enumerate IDs and read the rendered PDF contents of other open Print Preview dialogs, including those from other profiles or Incognito sessions.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 2 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 potential Insecure Direct Object Reference (IDOR) exists in chrome-untrusted://print/ due to sequential ID allocation and lack of frame-ownership validation. A compromised chrome-untrusted renderer could potentially fetch and disclose the rendered PDF contents of any concurrently open Print Preview dialog across different origins, profiles, or Incognito sessions. This occurs because the PDF storage backend is managed by a process-global singleton that does not validate the requesting context.

Affected files:

  • chrome/browser/ui/webui/print_preview/print_preview_ui_untrusted.cc
  • chrome/browser/printing/print_preview_data_service.cc
  • chrome/browser/ui/webui/print_preview/parse_data_path.cc
  • chrome/browser/ui/webui/print_preview/print_preview_ui.cc

Estimated timestamp from git blame: 2021-10-08

Root Cause

In chrome/browser/ui/webui/print_preview/print_preview_ui_untrusted.cc, the request filter for chrome-untrusted://print/ is registered with a static callback handler that receives only the URL path string. It completely lacks the context of the requesting frame or WebContents and does not check whether the requesting frame is associated with or authorized to access the requested ID:

C++
// chrome/browser/ui/webui/print_preview/print_preview_ui_untrusted.cc:42
PrintPreviewUIUntrusted::PrintPreviewUIUntrusted(content::WebUI* web_ui)
    : UntrustedWebUIController(web_ui) {
  content::WebUIDataSource* source = content::WebUIDataSource::CreateAndAdd(
      web_ui->GetWebContents()->GetBrowserContext(),
      chrome::kChromeUIUntrustedPrintURL);
  source->SetRequestFilter(base::BindRepeating(&ShouldHandleRequestCallback),
                           base::BindRepeating(&HandleRequestCallback));
}

The static callback extracts the parameters via ParseDataPath and retrieves the PDF data using a process-global singleton PrintPreviewDataService:

C++
// chrome/browser/ui/webui/print_preview/print_preview_ui_untrusted.cc:55
scoped_refptr<base::RefCountedMemory>
PrintPreviewUIUntrusted::GetPrintPreviewData(const std::string& path) {
  std::optional<PrintPreviewIdAndPageIndex> parsed = ParseDataPath(path);
  CHECK(parsed);

  scoped_refptr<base::RefCountedMemory> data =
      PrintPreviewDataService::GetInstance()->GetDataEntry(parsed->ui_id,
                                                           parsed->page_index);
  if (data) {
    return data;
  }
  ...
}

The validation performed by ParseDataPath in chrome/browser/ui/webui/print_preview/parse_data_path.cc (line 17) only ensures that ui_id >= 0 and that the indices are valid integer values.

Crucially, the backend store PrintPreviewDataService is a process-global base::Singleton that has no BrowserContext or profile-level keying:

C++
// chrome/browser/printing/print_preview_data_service.cc:109
PrintPreviewDataService* PrintPreviewDataService::GetInstance() {
  return base::Singleton<PrintPreviewDataService>::get();
}

Additionally, the preview_ui_id keys are sequential small integers allocated from a process-global base::IDMap starting at 1 and incrementing monotonically:

C++
// chrome/browser/ui/webui/print_preview/print_preview_ui.cc:1189
id_ = g_print_preview_ui_id_map.Get().Add(this);

Potential Attack Scenario

Under Chrome's threat model for chrome-untrusted:// pages, a compromised chrome-untrusted://print/ renderer is treated as a realistic precondition since it hosts PDFium in-process and parses untrusted, attacker-controlled PDF data.

We suggest the following potential steps an attacker could follow to trigger and exploit this vulnerability:

  1. An attacker initiates Print Preview on their own malicious page, causing a chrome-untrusted://print/ subresource/frame to commit.
  2. The attacker exploits a potential vulnerability in the chrome-untrusted renderer (e.g., in PDFium or Blink) to gain arbitrary code execution inside the renderer sandbox.
  3. The compromised renderer bypasses JS WebUI bindings and directly utilizes its bound WebUIURLLoaderFactory for chrome-untrusted:// to issue resource requests for chrome-untrusted://print/<N>/-1/print.pdf (where -1 corresponds to the complete preview document index).
  4. By scanning small sequential integers N, the request reaches the browser-side HandleRequestCallback.
  5. Because there is no frame-ownership, origin, or BrowserContext verification, the browser-side code fetches and returns the complete rendered PDF data belonging to ui_id N from the process-global singleton directly to the attacker's compromised renderer.

Note: These are potential steps; our current tooling does not have the ability to run code or verify a live proof of concept.

Suggested Fix

  1. Cryptographically Secure Tokens: Instead of exposing and using sequential integers (ui_id) directly in the chrome-untrusted:// URLs, generate a high-entropy cryptographically secure random token (e.g., a 128-bit hex string or UUID) for each print preview session, and require this token in the path to access the PDF data.
  2. Verify Requesting Frame Context: Implement validation on the browser side to ensure that the requesting frame's origin and BrowserContext match the BrowserContext associated with the print job data. Ensure that only the frame actually hosting the specific print preview is allowed to retrieve its PDF bytes.

Evaluated with Chrome root at commit: a2bea94528f4bd6cc57739c43fa3bb890b8367d3


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.

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 request filter for chrome-untrusted://print/ is a static callback that receives only the URL path, so it never checks the requesting frame or BrowserContext, and the PDF store is a process-global singleton keyed by sequential integers.

Impact

A compromised chrome-untrusted renderer could read the rendered PDF contents of other concurrently open Print Preview dialogs, potentially across origins, profiles and Incognito sessions, though the report notes the steps are potential and were not verified with a live proof of concept.

What the attacker needed

Attacker-controlled page opens Print Preview; compromise of chrome-untrusted renderer; another preview open at the same time

The fix

The report suggests using high-entropy random tokens instead of sequential IDs and verifying the requesting frame's origin and BrowserContext before returning PDF data; it does not say the issue was fixed.

How it was found

  1. Open Print Preview on an attacker-controlled page so a chrome-untrusted://print/ frame loads.
  2. Compromise the chrome-untrusted renderer to gain code execution inside the sandbox.
  3. Use the renderer's URL loader factory to request the print PDF path directly, bypassing the JS bindings.
  4. Scan small sequential IDs so requests reach the browser-side handler.
  5. Receive the rendered PDF data for other previews because no ownership check is made.

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 open Print Preview, Chrome stores the generated PDF and gives it a simple number, like 1, 2, 3. The page that serves that PDF only checks that the number exists, not that the person asking is the one who created it. So if an attacker could take over the special sandboxed page that shows print previews, they could try every number and read other people's printouts.

What is IDOR?

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.