Incorrect authorization in API (CVE-2026-113109)
The is_web_view protection in Chrome's extension network interception APIs can be bypassed by worker-initiated requests from a <webview>, because workers lack a RenderFrameHost and are assigned a null routing ID, causing the API to skip guest verification. A malicious extension could intercept a guest's Service Worker script, inject JavaScript, and achieve persistent XSS within the <webview>, potentially compromising privileged WebUIs like the Gemini side panel.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 7 months
Flapjack (go/flapjack), an LLM-powered static analysis tool, has identified the following potential security issue.
Overview: The is_web_view protection in the Web Request and DeclarativeNetRequest APIs can be bypassed by worker-initiated requests (e.g., Service Workers) originating from a <webview>. Because workers lack a RenderFrameHost, they are assigned a null routing ID, causing the API to skip guest process verification and incorrectly flag the traffic as standard. This allows a malicious extension to intercept the worker, inject XSS into the guest page, and potentially compromise privileged WebUIs like the Gemini side panel (chrome://glic).
Affected files:
extensions/browser/api/web_request/web_request_info.ccextensions/browser/api/declarative_net_request/ruleset_manager.ccextensions/browser/api/web_request/web_request_api.ccchrome/browser/chrome_content_browser_client.cc
Estimated timestamp from git blame: 2025-10-30
Summary
There is a potential security vulnerability in the extension network interception APIs (webRequest and declarativeNetRequest) where traffic originating from Service Workers or Shared Workers within a <webview> guest is not correctly identified as <webview> traffic.
By design, extensions are restricted from intercepting and modifying <webview> traffic unless explicitly permitted. However, because worker requests are not associated with a specific UI frame, they bypass the is_web_view check in WebRequestInfoInitParams. An attacker with a malicious extension can exploit this to intercept a guest's Service Worker script, inject arbitrary JavaScript, and achieve persistent Cross-Site Scripting (XSS) within the <webview>. If the <webview> is hosted by a privileged WebUI (such as the Gemini side panel at chrome://glic), this XSS can be weaponized to interact with privileged Mojo bridges and exfiltrate sensitive user data.
Root Cause Analysis
The vulnerability stems from how is_web_view is initialized during the creation of a proxied URLLoaderFactory:
-
When a Service Worker is registered or makes a
fetch()request within a<webview>,content::EmbeddedWorkerInstance::CreateFactoryBundleis called to create aURLLoaderFactory. -
Because Service Workers are decoupled from specific UI frames,
nullptris passed as theframe_hostargument tourl_loader_factory::ContentClientParams. -
This triggers
ChromeContentBrowserClient::WillCreateURLLoaderFactorywith anullptrframe. -
The call is routed to
extensions::WebRequestAPI::MaybeProxyURLLoaderFactoryInternal. To determine theframe_routing_id, the code uses the ternary operator:frame ? frame->GetRoutingID() : IPC::mojom::kRoutingIdNoneSinceframeisnullptr, the routing ID becomesIPC::mojom::kRoutingIdNone(which is-2). -
This
-2routing ID is passed down toWebRequestProxyingURLLoaderFactoryand subsequently toWebRequestInfoInitParams::InitializeWebViewAndFrameData. -
Inside
InitializeWebViewAndFrameData(inextensions/browser/api/web_request/web_request_info.cc), the code attempts to determine if the request is from a<webview>:C++ } else if (frame_routing_id != IPC::mojom::kRoutingIdNone) { #if BUILDFLAG(ENABLE_GUEST_VIEW) // Grab any WebView-related information if relevant. // ... (WebViewRendererState lookup occurs here) -
Because
frame_routing_idis-2(kRoutingIdNone), thiselse ifbranch evaluates tofalse. TheWebViewRendererStatelookup is skipped entirely. -
As a result, the
is_web_viewflag remains at its default value offalse. ThewebRequestand DNR event routers subsequently evaluate the request as standard web traffic, allowing extensions to intercept it.
Potential Exploitation Scenario
Note: As an AI agent, I cannot run or verify a functional proof-of-concept, but code analysis strongly suggests the following attack chain is possible:
- Extension Installation: An attacker publishes a malicious extension requesting
webRequestordeclarativeNetRequestpermissions for<all_urls>or*://gemini.google.com/*, which the victim installs. - Target Invocation: The user opens the Gemini side panel, which loads the highly privileged
chrome://glicWebUI. This WebUI creates a<webview>configured with a custom partition (persist:glicpart) and navigates tohttps://gemini.google.com/. - Worker Interception: The
gemini.google.comguest attempts to register or update its Service Worker (sw.js). Due to the bug, the malicious extension successfully intercepts this request. - Payload Injection: The extension modifies the HTTP response for
sw.js, injecting an attacker-controlled JavaScript payload. - Persistent XSS: The malicious Service Worker is installed. It intercepts subsequent
fetchevents from thegemini.google.comguest page and injects an XSS payload directly into the main HTML document served to the<webview>. - Privilege Escalation: The injected script executes within the
<webview>. It leverages the pre-establishedwindow.postMessagebridge (set up inchrome/browser/resources/glic/glic_api_impl/post_message_transport.ts) to communicate with the privilegedchrome://glicWebUI. - Data Theft: The attacker's script forges a message to invoke privileged APIs exposed by
GlicApiHost, such asglicBrowserGetContextFromFocusedTab. The browser process executes this command, returning the DOM text, PDF data, or screenshot of the user's currently focused tab, achieving a universal cross-origin read.
Proposed Fix Considerations
Fixing this issue requires identifying <webview> traffic even when a RenderFrameHost is absent.
Caution: Relying on WebViewRendererState::IsGuest(render_process_id) as a fallback may be insufficient. Service Workers for a <webview> guest are allocated their own dedicated processes (as SiteInstanceImpl::CreateForServiceWorker does not support process reuse for <webview>). Because this new process contains no frames, it is never added to WebViewRendererState's internal maps. Therefore, WebViewRendererState will not recognize the Service Worker's process ID as a guest.
A more robust fix should verify if the StoragePartition or SiteInstance associated with the request (which is available during factory creation) belongs to a guest, rather than relying solely on frame-based routing IDs or WebViewRendererState.
Evaluated with Chrome root at commit: 9760e6c70cd33a320713361f17c6dcca85648c0f
Results from Flapjack so far have been promising, but it can be wrong in its deductions. At this time, it does not produce proof of concepts or fuzzer tests. If this proves to be a false positive, please close as WAI; data from false positives will be used to improve Flapjack’s 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 code that sets the is_web_view flag only checks for a frame routing ID, but worker requests have no frame and get a special null ID, so the check is skipped and the request is treated as normal web traffic.
Impact
A malicious extension could achieve persistent XSS within a <webview> and, if that <webview> is hosted by a privileged WebUI, potentially read data from the user's focused tab, though the report notes that a functional proof-of-concept was not run or verified.
What the attacker needed
Victim installs a malicious extension; extension has webRequest or DNR permissions; victim opens a privileged WebUI with a <webview>
The fix
The issue should be fixed by checking whether the StoragePartition or SiteInstance associated with the request belongs to a guest, rather than relying solely on frame-based routing IDs or WebViewRendererState.
How it was found
- An attacker publishes a malicious extension requesting webRequest or declarativeNetRequest permissions for all URLs or the target domain, and the victim installs it.
- The user opens the Gemini side panel, which loads the privileged chrome://glic WebUI and creates a <webview> pointing to gemini.google.com.
- The guest page attempts to register or update its Service Worker, and the malicious extension intercepts this request due to the bug.
- The extension modifies the HTTP response for the Service Worker script, injecting attacker-controlled JavaScript.
- The malicious Service Worker is installed and intercepts subsequent fetch events, injecting an XSS payload into the main HTML document served to the <webview>.
- The injected script uses the existing window.postMessage bridge to call privileged APIs like glicBrowserGetContextFromFocusedTab, exfiltrating data from the user's focused tab.
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 <webview> is like a browser tab embedded inside a page. Chrome normally stops extensions from reading or changing traffic inside a <webview> unless the extension is explicitly allowed. This report says that rule can be bypassed when the <webview> uses a background worker (a script that runs without a visible page), letting a malicious extension inject code and steal data.
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.