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

Insufficient validation of untrusted input in WebSockets (CVE-2026-17768)

The browser process's WebSocket connector did not check that a renderer-supplied URL used a WebSocket scheme, so a compromised renderer could send arbitrary URLs. This let it spoof extension telemetry and avoid the process termination that should follow an invalid message.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 3 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 Chrome Security team. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: WebSocketConnectorImpl in the browser process fails to validate the URL scheme provided by the renderer, allowing non-WebSocket URLs to be processed. This enables a compromised renderer to spoof extension telemetry for arbitrary URLs and evade process termination for malformed Mojo messages.

Affected files:

  • content/browser/websockets/websocket_connector_impl.cc
  • extensions/browser/api/web_request/web_request_proxying_websocket.cc
  • services/network/websocket_factory.cc
  • extensions/browser/api/web_request/web_request_resource_type.cc

Estimated timestamp from git blame: 2019-07-04

Summary

The blink.mojom.WebSocketConnector interface, implemented by WebSocketConnectorImpl in the browser process, fails to validate that the URL provided by the renderer uses a WebSocket scheme (ws or wss). This lack of validation allows a compromised renderer to spoof extension telemetry and evade the 'bad message' process termination mechanism, while also causing stability issues in debug builds.

Root Cause

In content/browser/websockets/websocket_connector_impl.cc, the Connect method receives a renderer-controlled GURL but does not verify the scheme before passing it to the browser client or the network context:

C++
// content/browser/websockets/websocket_connector_impl.cc:78
void WebSocketConnectorImpl::Connect(const GURL& url, ...) {
  // ...
  if (GetContentClient()->browser()->WillInterceptWebSocket(frame)) {
    GetContentClient()->browser()->CreateWebSocket(..., url, ...); // No scheme check
    return;
  }
  // ...
  storage_partition->GetNetworkContext()->CreateWebSocket(url, ...); // No scheme check
}

Security Impacts

1. Extension Telemetry Spoofing

When an extension using webRequest or declarativeNetRequest is active, the request is intercepted by WebRequestProxyingWebSocket. Because the URL scheme is not validated, the type mapping logic in extensions/browser/api/web_request/web_request_resource_type.cc defaults to WebRequestResourceType::OTHER for non-WebSocket schemes (like https or file).

This allows a compromised renderer to trigger extension events (like onBeforeRequest or onSendHeaders) for arbitrary URLs. This can be used to inject fake data into security logs or bypass extension rules that are only configured to monitor specific resource types.

2. Defense-in-Depth (Bad-Message Kill) Evasion

If the request is not blocked by an extension, it eventually reaches WebSocketFactory::CreateWebSocket in the Network Service. The Network Service correctly identifies the invalid scheme and reports a bad message via mojo::ReportBadMessage("Invalid scheme.").

However, because the validation happens on the IPC pipe between the browser process and the Network Service, the 'bad message' is attributed to the browser process rather than the originating renderer. In official builds, this results in the Network Service logging a warning and calling DumpWithoutCrashing(), allowing the compromised renderer to continue execution and evade the process termination that should have occurred.

3. Stability (Crashes)

In debug builds, this logic flaw causes a browser-wide crash. WebRequestProxyingWebSocket::OnBeforeRequestComplete contains a DCHECK(info_.url.SchemeIsWSOrWSS()) at line 361. Since the browser process did not validate the scheme earlier, this DCHECK fails when a compromised renderer sends a non-WebSocket URL.

Potential Reproduction Steps

  1. Compromise a renderer process (e.g., via a V8 vulnerability).
  2. From the compromised renderer, obtain the frame's blink.mojom.WebSocketConnector interface.
  3. Call Connect with an arbitrary URL, such as https://accounts.google.com/ or file:///etc/passwd.
  4. Observe that webRequest extensions receive events for the provided URL with a resource type of "other".
  5. Observe that the renderer is not terminated despite sending an invalid Mojo message.
  6. In debug builds, observe that the entire browser process crashes.

Suggested Fix

Explicitly validate the URL scheme in WebSocketConnectorImpl::Connect and WebSocketConnectorImpl::ConnectCalledByContentBrowserClient. If the URL does not have a ws or wss scheme, the browser process should call mojo::ReportBadMessage to terminate the compromised renderer immediately.

Evaluated with Chrome root at commit: b3153093eb3c78c3e88ccf562bcbc20437a04b0e


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

The Connect method in WebSocketConnectorImpl passed a renderer-controlled URL to the browser client or network context without verifying that its scheme was ws or wss.

Impact

A compromised renderer could inject fake data into extension security logs or bypass extension rules, and could evade the bad-message process termination; debug builds crash, but official builds only log a warning.

What the attacker needed

Compromised renderer process; webRequest extension active for telemetry spoofing

The fix

The browser process should explicitly check the URL scheme in WebSocketConnectorImpl::Connect and ConnectCalledByContentBrowserClient and call mojo::ReportBadMessage for non-WebSocket schemes.

How it was found

  1. Compromise a renderer process.
  2. Obtain the frame's WebSocketConnector interface from the compromised renderer.
  3. Call Connect with an arbitrary non-WebSocket URL.
  4. Observe webRequest extensions receiving events for that URL with resource type other.
  5. Observe the renderer not being terminated despite the invalid message.
  6. In debug builds, observe the whole browser process crashing.

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 in a sandboxed part of the browser called the renderer. It can ask the browser process to open a WebSocket, which is a two-way network connection. The browser process trusted the renderer to send only WebSocket addresses, but it did not check, so a hacked renderer could send other kinds of addresses and confuse browser features.

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.