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

Insufficient policy enforcement in WebUI (CVE-2026-7946)

A compromised WebUI renderer with webview permissions could bypass origin isolation to fetch and read arbitrary chrome:// or chrome-untrusted:// resources. This occurs because the webview.executeScript API incorrectly uses the target URL's scheme and an empty allowed hosts list when creating a WebUIURLLoaderFactory.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 42 days

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

Overview: A compromised WebUI renderer with <webview> permissions can potentially bypass origin isolation to fetch and read arbitrary chrome:// or chrome-untrusted:// resources. This occurs because the webview.executeScript API incorrectly uses the target URL's scheme and an empty allowed hosts list when creating a WebUIURLLoaderFactory.

Affected files:

  • extensions/browser/guest_view/web_view/web_ui/web_ui_url_fetcher.cc
  • extensions/browser/api/guest_view/web_view/web_view_internal_api.cc
  • content/browser/webui/web_ui_url_loader_factory.cc

Estimated timestamp from git blame: 2025-10-01

Summary

A potential vulnerability exists in the WebUI <webview> script and CSS injection APIs (webview.executeScript and webview.insertCSS) that could allow a compromised WebUI renderer to bypass site isolation. If an attacker compromises a WebUI that has <webview> privileges (such as chrome-untrusted://lens/ or chrome://oobe/), they can abuse these APIs to fetch and extract sensitive source code or data from any other chrome:// or chrome-untrusted:// origin.

Note: The following steps are suggested potential steps an attacker might take, as our setup does not have the ability to run code to verify an exploit natively.

Potential Attacker Steps & Technical Details

  1. Compromise a WebUI: An attacker achieves arbitrary code execution (e.g., via XSS) in a privileged WebUI renderer like chrome-untrusted://lens/.
  2. Setup Guest Frame: The attacker injects a <webview> element, navigates it to a controlled data: URI, and sets up JavaScript traps (e.g., Proxy objects on the global window) within the guest frame to capture any subsequently injected scripts.
  3. Invoke Injection API: The attacker calls document.querySelector('webview').executeScript({file: 'chrome://settings/settings.js'});.
  4. URL Resolution Flaw: In the browser process, WebViewInternalExecuteCodeFunction::LoadFileForEmbedder resolves the file string against the embedder's origin (extensions/browser/api/guest_view/web_view/web_view_internal_api.cc:545). Because the attacker provided an absolute URL, GURL::Resolve returns chrome://settings/settings.js as the file_url.
  5. Improper Factory Creation: WebUIURLFetcher::Start() then creates a WebUIURLLoaderFactory to fetch the file (extensions/browser/guest_view/web_view/web_ui/web_ui_url_fetcher.cc:42). Crucially, it requests the factory using the target URL's scheme (url_.GetScheme(), which is chrome) instead of the embedder's scheme (chrome-untrusted). It also passes an empty {} for allowed_hosts.
  6. Security Checks Bypassed: In WebUIURLLoaderFactory::CreateLoaderAndStart (content/browser/webui/web_ui_url_loader_factory.cc), the request bypasses isolation checks. The scheme check passes because the factory was explicitly created for the target's scheme. The host check (CHECK(allowed_hosts_.empty() || ...)) trivially passes because the allowed hosts set is empty.
  7. Exfiltration: The cross-origin resource is fetched from URLDataManagerBackend, bypassing renderer-side CORS, and injected into the attacker-controlled guest frame. The attacker's JS traps capture the script contents and send them back to the embedder, successfully breaking WebUI isolation boundaries.

Suggested Fix

  1. Origin Validation: In WebViewInternalExecuteCodeFunction::LoadFileForEmbedder, explicitly check that the resolved file_url shares the same origin (or at least the same scheme and host) as the embedder's owner_base_url before allowing the fetch to proceed.
  2. Strict Factory Binding: Ensure WebUIURLFetcher instantiates the WebUIURLLoaderFactory using the embedder's scheme and host, rather than deriving it from the potentially attacker-controlled target URL.

Evaluated with Chrome root at commit: 0eb4855bda702feaaa8b899336664f97e3df88b8


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. Please feel free to reach out to me if you have concerns or feedback.

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 WebUIURLFetcher creates a WebUIURLLoaderFactory using the target URL's scheme and an empty allowed hosts list, instead of the embedder's scheme and host, bypassing isolation checks.

Impact

A compromised WebUI renderer could read sensitive source code or data from any other chrome:// or chrome-untrusted:// origin, breaking WebUI isolation boundaries.

What the attacker needed

Compromise a WebUI renderer with webview permissions; ability to inject a webview element

The fix

The fix should validate that the resolved file URL shares the same origin as the embedder and create the factory using the embedder's scheme and host.

How it was found

  1. Compromise a WebUI renderer with webview permissions, e.g., via XSS.
  2. Inject a webview element and navigate it to a controlled data: URI with JavaScript traps.
  3. Call webview.executeScript with an absolute chrome:// file path.
  4. The file URL is resolved against the embedder's origin, yielding the absolute chrome:// URL.
  5. WebUIURLFetcher creates a factory using the target's scheme and empty allowed hosts.
  6. The cross-origin resource is fetched and injected into the guest frame, where traps capture it.

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.

WebUI pages are internal browser pages like settings. A webview is an embedded frame that can run scripts. The bug lets a malicious page that already has webview access read files from other internal pages, which should be isolated.

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.