Insufficient validation of untrusted input in WebView (CVE-2026-17736)
A compromised renderer could forge a subresource request with a document destination, bypassing validation in the network service. This made Android WebView's shouldInterceptRequest callback treat the request as a main-frame navigation, potentially letting the attacker read sensitive data returned by the embedder.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 4 months
Project Fortify, an experimental security project, has identified the following potential security issue.
Overview: A compromised renderer can forge a subresource request with destination = kDocument, bypassing CorsURLLoaderFactory validation. In Android WebView, this causes the shouldInterceptRequest callback to incorrectly identify the request as isForMainFrame() == true, allowing the renderer to bypass navigation checks and steal sensitive data.
Affected files:
android_webview/browser/network_service/aw_web_resource_request.ccservices/network/cors/cors_url_loader_factory.cc
Estimated timestamp from git blame: 2025-11-04
Summary
A potential vulnerability exists where a compromised renderer can craft a network::ResourceRequest that misleads the Android WebView shouldInterceptRequest callback into believing a subresource fetch is an outermost main-frame navigation (isForMainFrame() == true). This allows an attacker to bypass critical navigation-specific security checks (like shouldOverrideUrlLoading) and trick embedder applications into serving sensitive main-frame-only data directly to the renderer process.
Technical Details
1. Validation Bypass in Network Service:
The CorsURLLoaderFactory::IsValidRequest function in services/network/cors/cors_url_loader_factory.cc validates requests from unprivileged renderers. While it explicitly checks if request.original_destination == kDocument requires request.mode == kNavigate (lines 682-689), it fails to perform a reciprocal check for request.destination.
At line 776, kDocument is explicitly listed as an allowed destination from unprivileged processes. A compromised renderer can send a request with destination = kDocument, mode = kNoCors, and original_destination = kEmpty. Because original_destination is empty, the check enforcing navigation mode is bypassed, and the request is allowed through as a valid subresource fetch.
2. State Confusion in Android WebView:
When this request reaches Android WebView's AwProxyingURLLoaderFactory, it is translated into an AwWebResourceRequest to be sent to the Java embedder (android_webview/browser/network_service/aw_web_resource_request.cc:25-26).
The is_outermost_main_frame boolean is calculated directly from the spoofed destination:
is_outermost_main_frame(request.destination == network::mojom::RequestDestination::kDocument)
Consequently, the Java shouldInterceptRequest callback receives the request and reports isForMainFrame() == true.
3. Bypassing Navigation Checks and ORB:
Because the request was initiated as a subresource fetch (mode = kNoCors), it completely bypasses the browser's navigation stack. This means critical callbacks like shouldOverrideUrlLoading—which embedders rely on to block dangerous top-level navigations—are never triggered.
If the embedder trusts the isForMainFrame flag and provides a custom WebResourceResponse, the C++ layer serves it using AndroidStreamReaderURLLoader. Unlike the standard network::URLLoader, this custom loader does not implement Opaque Response Blocking (ORB) sniffing. The compromised renderer can thus read the sensitive response body without being blocked.
Potential Attacker Steps
(Note: These are potential steps as the Flapjack LLM agent cannot currently run or verify live exploit code.)
- Compromise Renderer: The attacker exploits a memory safety bug to gain arbitrary code execution in the WebView renderer process.
- Craft Malicious Request: Using the Mojo
URLLoaderFactoryinterface, the attacker constructs anetwork::ResourceRequesttargeting a sensitive URL (e.g., an internal app endpoint). - Spoof Properties: The attacker sets
destination = kDocument,mode = kNoCors, andoriginal_destination = kEmpty. - Send Request: The request is sent to the Network Service, cleanly bypassing
CorsURLLoaderFactory::IsValidRequest. - Bypass Navigation Stack: The request skips the standard navigation flow (and thus
shouldOverrideUrlLoading) but triggersshouldInterceptRequestin the Java embedder. - Deceive Embedder: The embedder app calls
request.isForMainFrame(), which returnstrue. Believing it is a safe top-level load, the app returns a response containing sensitive data (e.g., auth tokens). - Exfiltrate Data: The
AndroidStreamReaderURLLoaderstreams the response back to the renderer without ORB checks, allowing the attacker to read the sensitive data.
Suggested Fix
In services/network/cors/cors_url_loader_factory.cc, update IsValidRequest to enforce that whenever request.destination == mojom::RequestDestination::kDocument (or kFrame, kIframe, etc.), the request.mode must be mojom::RequestMode::kNavigate.
if (request.destination == mojom::RequestDestination::kDocument &&
request.mode != mojom::RequestMode::kNavigate) {
mojo::ReportBadMessage("CorsURLLoaderFactory: destination kDocument requires mode kNavigate");
return false;
}
This prevents compromised renderers from spoofing frame types on subresource requests.
Evaluated with Chrome root at commit: False
Results from Fortify 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 Fortify’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 network service's request validation only checked original_destination for navigation mode, not destination, so a renderer could set destination to document without navigation mode and have it accepted as a subresource.
Impact
A compromised renderer could bypass navigation checks and read sensitive main-frame-only data returned by the embedder, as the custom loader lacks opaque response blocking.
What the attacker needed
Compromised renderer process; ability to send Mojo requests
The fix
The validation should be updated to require navigation mode whenever the destination is document, frame, or iframe.
How it was found
- Compromise the renderer process to gain code execution.
- Craft a resource request targeting a sensitive URL using the Mojo URLLoaderFactory interface.
- Set destination to document, mode to no-cors, and original_destination to empty.
- Send the request to the network service, bypassing validation.
- The request skips navigation checks but triggers shouldInterceptRequest in the embedder.
- The embedder sees isForMainFrame() as true and returns sensitive data, which is streamed back without opaque response blocking.
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 web page runs inside a sandboxed process called a renderer. If an attacker can break out of that sandbox, they can send fake requests to the browser's network service. This report shows that a fake request could be made to look like a top-level page load, tricking the app into handing over private 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.