Externally controlled reference in WebView (CVE-2026-79256)
A compromised renderer in Android WebView could bypass security checks to read local content:// URIs, potentially accessing sensitive host-app data like contacts and SMS. The flaw combines missing scheme validation for redirects with a Mojo receiver double-bind that silently replaces the network loader with a local file reader.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 5 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 without the security team.
Overview: A compromised renderer in Android WebView can potentially read sensitive host-app data by exploiting an insecure redirect handling mechanism. Missing scheme validation in the network stack combined with a Mojo receiver double-bind in WebView's proxy loader allows an attacker to bypass security checks and access local content:// URIs.
Affected files:
android_webview/browser/network_service/aw_proxying_url_loader_factory.ccservices/network/cors/cors_url_loader.ccandroid_webview/browser/network_service/net_helpers.cc
Estimated timestamp from git blame: 2024-06-28
Description
A potential vulnerability exists in Android WebView's request interception logic that could allow a compromised renderer process to read data from any ContentProvider the host application has permission to access. This includes sensitive information such as contacts, SMS, and private app data.
The issue arises from a combination of missing scheme validation for redirects in the Network Service and a Mojo receiver double-bind bug in AwProxyingURLLoaderFactory.
Root Cause Analysis
- Insecure Redirect Handling: When an HTTP subresource fetch (e.g.,
kNoCors) receives a 302 redirect to a local URI likecontent://com.android.contacts/data/1, the Network Service evaluates the redirect.URLRequestJobFactory::IsSafeRedirectTargetdefaults totruefor unregistered schemes.CorsURLLoader::OnReceiveRedirectrelies on this and forwards the redirect to the renderer without explicitly blockingcontent://. - Renderer Check Bypass: A compromised renderer can bypass Blink's
SecurityOrigin::CanDisplaychecks (which normally block local redirects) and send aFollowRedirectIPC directly to the browser. - Mojo Double-Bind in WebView Proxy: The
FollowRedirectIPC reachesInterceptedRequest::FollowRedirectinAwProxyingURLLoaderFactory. It updates the target URL to thecontent://URI and callsRestart(), which synchronously reachesContinueAfterIntercept(). - Silent Pipe Replacement:
ContinueAfterIntercept()detects thecontent://scheme and creates anAndroidStreamReaderURLLoaderto read the local data. To connect this new loader, it callsproxied_client_receiver_.BindNewPipeAndPassRemote(). Because the receiver is already bound to the active network loader, this violates Mojo invariants. However, in Release builds, theDCHECK(!is_bound())is compiled out. Mojo silently drops the old pipe (orphaning the network loader and suppressing its subsequentnet::ERR_UNKNOWN_URL_SCHEMEerror) and binds the new local loader. - Sandbox Escape: The
AndroidStreamReaderURLLoadersuccessfully reads the sensitivecontent://URI using the host app's elevated permissions and streams the data back to the compromised renderer.
Potential Reproduction Steps
Note: These are suggested/potential steps to trigger the vulnerability. Our tooling agent does not currently have the ability to run code or verify a working proof of concept.
- Gain code execution in an Android WebView renderer process.
- Initiate a subresource fetch (e.g., via
fetch()withmode: 'no-cors') to an attacker-controlled HTTP server. - Have the attacker-controlled server respond with a
302 Foundand aLocationheader pointing to a sensitive local URI (e.g.,Location: content://com.android.contacts/data/1). - Upon receiving the redirect IPC in the compromised renderer, ignore Blink-side security checks and manually send a
FollowRedirectMojo IPC back to the browser process. - The browser process will inadvertently re-bind the data pipe to a local
AndroidStreamReaderURLLoader. - Read the sensitive host application data from the response body data pipe.
Suggested Fix
- Fix the Mojo Double-Bind: In
InterceptedRequest::ContinueAfterIntercept()(withinaw_proxying_url_loader_factory.cc), check ifproxied_client_receiver_.is_bound()before attempting to bind a new pipe. If it is already bound (e.g., during a redirect to a local scheme), the request should be explicitly aborted or reset properly. - Block Local Redirects: Explicitly block redirects from external schemes (HTTP/HTTPS) to local WebView schemes (
content://,file:///android_asset/, etc.) withinInterceptedRequest::FollowRedirectorCorsURLLoader::CheckRedirectLocation.
Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33
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
Likely a combination of missing scheme validation for redirects in the network stack and a Mojo receiver double-bind in WebView's proxy loader that silently replaces the network loader with a local file reader.
Impact
A compromised renderer could read data from any ContentProvider the host app can access, including contacts, SMS, and private app data, though the report notes these are potential steps and not yet verified.
What the attacker needed
Compromised renderer process; attacker-controlled HTTP server
The fix
The fix should check if the Mojo receiver is already bound before re-binding and explicitly block redirects from external schemes to local WebView schemes.
How it was found
- Gain code execution in an Android WebView renderer process.
- Initiate a subresource fetch to an attacker-controlled HTTP server.
- Have the server respond with a 302 redirect to a sensitive local URI.
- In the compromised renderer, ignore Blink-side checks and send a FollowRedirect IPC to the browser.
- The browser re-binds the data pipe to a local AndroidStreamReaderURLLoader.
- Read the sensitive host application data from the response body.
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.
Android WebView is a component that lets apps show web content inside them. A compromised renderer means an attacker has already broken into the part of the browser that runs web pages. This bug would let that attacker trick the browser into reading local files that belong to the app, such as contacts or messages, by abusing how redirects are handled.
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.