Insufficient validation of untrusted input in Chromecast (CVE-2026-16414)
An unvalidated Mojo interface in Chromecast let a local process register arbitrary WebUI hosts, and host matching ignored the URL scheme, so navigating to a chrome:// URL with that host granted privileged WebUI bindings. An unprivileged local Android app could therefore run its own HTML and JavaScript with high-privilege bindings, potentially escaping the sandbox.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 55 days
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: An unvalidated Mojo API, CastWebService::RegisterWebUiClient, allows a local process connected to the Cast Mojo broker to register arbitrary hosts. Because host matching in CastWebUiControllerFactory is scheme-agnostic, navigating to a chrome:// URL with the registered host bypasses standard AllowBindings checks. This potentially allows an attacker to execute custom HTML/JS with privileged WebUI bindings, resulting in a sandbox escape.
Affected files:
chromecast/browser/cast_web_service.ccchromecast/browser/webui/cast_webui_controller_factory.ccchromecast/browser/webui/cast_webui.ccchromecast/browser/webui/cast_resource_data_source.cc
Estimated timestamp from git blame: 2020-07-14
Technical Analysis
1. Unvalidated Host Registration
In chromecast/browser/cast_web_service.cc (line 123), the CastWebService::RegisterWebUiClient method is implemented as follows:
void CastWebService::RegisterWebUiClient(
mojo::PendingRemote<mojom::WebUiClient> client,
const std::vector<std::string>& hosts) {
cast_webui_hosts_ = hosts;
content::WebUIControllerFactory::RegisterFactory(
new CastWebUiControllerFactory(std::move(client), hosts));
}
This function accepts arbitrary host strings and a client-supplied remote without verifying calling permissions or restricting registrations to a validated allowlist. Additionally, each invocation registers a new CastWebUiControllerFactory via raw new, which leaks the factory into memory across the life of the process.
2. Scheme-Agnostic Host Matching
In chromecast/browser/webui/cast_webui_controller_factory.cc (line 29), GetWebUIType determines whether the factory should handle a URL purely based on the host component:
content::WebUI::TypeID CastWebUiControllerFactory::GetWebUIType(
content::BrowserContext* browser_context,
const GURL& url) {
if (std::ranges::contains(hosts_, url.GetHost())) {
return const_cast<CastWebUiControllerFactory*>(this);
}
return content::WebUI::kNoWebUI;
}
Because this matching check does not inspect the URL scheme, navigating to chrome://<attacker-host> successfully satisfies the check and returns a valid WebUI type.
3. Bypassing AllowBindings Validation
In content/browser/renderer_host/render_frame_host_impl.cc (line 8080), standard defense-in-depth checks verify that WebUI bindings are only granted if the target process is locked to a valid WebUI scheme:
ProcessLock process_lock = GetProcess()->GetProcessLock();
if (!process_lock.IsLockedToSite() ||
!std::ranges::contains(URLDataManagerBackend::GetWebUISchemes(),
process_lock.GetProcessLockURL().GetScheme())) {
...
NOTREACHED();
}
Because the navigated URL uses the "chrome" scheme (e.g., chrome://pwn), the process lock scheme evaluates to "chrome", which is present inside URLDataManagerBackend::GetWebUISchemes(). Thus, the security assertion passes, allowing high-privilege kWebUIBindingsPolicySet bindings to be granted to the renderer process.
4. Privilege Elevation & Arbitrary Code Execution
Once CastWebUI is constructed, it unconditionally enables the privileged bindings (webui->SetBindings(content::kWebUIBindingsPolicySet)) in chromecast/browser/webui/cast_webui.cc (line 28), and requests page resources from the attacker's client remote (client->CreateController).
When the renderer requests files, CastResourceDataSource::StartDataRequest retrieves raw bytes directly from the custom mojom::Resources provider controlled by the attacker (chromecast/browser/webui/cast_resource_data_source.cc, line 37). This allows arbitrary HTML/JavaScript execution in a privileged WebUI renderer, exposing privileged Mojo interfaces to the attacker and enabling a sandbox escape.
Attack Vector and Access Control
On Android, standard deployments that utilize bundle-splits stand up the ExternalMojoBroker with abstract namespace sockets (use_abstract_namespace = true) in chromecast/external_mojo/public/cpp/external_mojo_broker.cc (lines 431-432).
Crucially, during connection acceptance, AcceptSocketConnection is called with check_peer_user = false (line 396), bypassing UID matching. Consequently, any unprivileged local Android application can connect to the broker, bind mojom::CastWebService, register a custom host, and escalate privileges.
Potential Steps to Reproduce (Theoretical)
(Note: These are potential steps based on source-level analysis; our tooling does not currently run executable tests.)
- Connect to the abstract Unix socket of the Cast Mojo Broker from a local process.
- Bind to the
chromecast.mojom.CastWebServiceinterface usingExternalConnector::BindInterface. - Invoke
RegisterWebUiClientwith a custom host string (e.g.,["pwn"]) and a custom implementation ofmojom::WebUiClient. - Call
CreateWebViewto register a web view. - Navigate the page to
chrome://pwn. - Supply custom HTML and JS utilizing MojoJS bindings via the
mojom::Resourcescallback. - Execute arbitrary Javascript with full
kWebUIBindingsPolicySetbindings in the renderer, which can be leveraged to escape the sandbox.
Suggested Fix
- Enforce Scheme Validation: Update
CastWebUiControllerFactory::GetWebUITypeto explicitly require the URL to have a valid expected WebUI scheme (e.g., verifyingurl.SchemeIs(content::kChromeUIScheme)). - Host Constraints: Restrict
hostsregistered viaCastWebService::RegisterWebUiClientto a strict, hardcoded allowlist of permitted internal Cast WebUI host names, preventing arbitrary host injection. - Broker Authorization: Secure the external Mojo broker configuration to validate peer credentials (UID) where possible, ensuring only authorized system services or split-components can access internal Cast Mojo interfaces.
Evaluated with Chrome root at commit: 5133b93d189b383c37805b1cf3a9d2dbfe8d7379
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.
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 combination of an unauthenticated Mojo registration method that accepts arbitrary host names and a WebUI factory that matches hosts without checking the URL scheme, so the standard bindings assertion passes for a chrome:// URL.
Impact
An unprivileged local Android app could run arbitrary JavaScript with privileged WebUI bindings, which could be leveraged to escape the sandbox; the steps are theoretical and were not executed.
What the attacker needed
Local app on the same Android device; Cast Mojo broker reachable via abstract socket; no executable test performed
The fix
The report suggests requiring a valid WebUI scheme in the factory, restricting registered hosts to a hardcoded allowlist, and validating peer credentials at the broker; the text does not say it was fixed.
How it was found
- Connect to the abstract Unix socket of the Cast Mojo Broker from a local process.
- Bind to the CastWebService interface through the external connector.
- Call RegisterWebUiClient with a custom host and a custom WebUiClient implementation.
- Call CreateWebView to register a web view.
- Navigate the page to the chrome:// URL using the registered host.
- Serve custom HTML and JavaScript through the resources callback so it runs with privileged bindings.
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 sandbox is the wall that stops one app from reaching the rest of the phone or browser internals. Here a local app could talk to an internal service that never checked who was calling, and that service let it claim a special internal page name. Because the page-name check ignored the address type, the app's own web content was treated as a trusted built-in page and given powerful access.
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.