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

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.cc
  • chromecast/browser/webui/cast_webui_controller_factory.cc
  • chromecast/browser/webui/cast_webui.cc
  • chromecast/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:

C++
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:

C++
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:

C++
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.)

  1. Connect to the abstract Unix socket of the Cast Mojo Broker from a local process.
  2. Bind to the chromecast.mojom.CastWebService interface using ExternalConnector::BindInterface.
  3. Invoke RegisterWebUiClient with a custom host string (e.g., ["pwn"]) and a custom implementation of mojom::WebUiClient.
  4. Call CreateWebView to register a web view.
  5. Navigate the page to chrome://pwn.
  6. Supply custom HTML and JS utilizing MojoJS bindings via the mojom::Resources callback.
  7. Execute arbitrary Javascript with full kWebUIBindingsPolicySet bindings in the renderer, which can be leveraged to escape the sandbox.

Suggested Fix

  1. Enforce Scheme Validation: Update CastWebUiControllerFactory::GetWebUIType to explicitly require the URL to have a valid expected WebUI scheme (e.g., verifying url.SchemeIs(content::kChromeUIScheme)).
  2. Host Constraints: Restrict hosts registered via CastWebService::RegisterWebUiClient to a strict, hardcoded allowlist of permitted internal Cast WebUI host names, preventing arbitrary host injection.
  3. 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.

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 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

  1. Connect to the abstract Unix socket of the Cast Mojo Broker from a local process.
  2. Bind to the CastWebService interface through the external connector.
  3. Call RegisterWebUiClient with a custom host and a custom WebUiClient implementation.
  4. Call CreateWebView to register a web view.
  5. Navigate the page to the chrome:// URL using the registered host.
  6. 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.

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.