Skip to content
CORS Advisory Advanced CVE-2026-5919

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

The browser-side WebSocket connector accepted renderer-supplied site_for_cookies and storage access status values without validating them against browser state. A compromised renderer could spoof these to make a cross-site WebSocket appear first-party with a storage access grant, causing SameSite=None cookies from the target origin to be sent in the handshake.

Richard Belisle Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 57 days

WebSocketConnector.Connect() takes site_for_cookies and storage_access_api_status as renderer-supplied Mojo parameters. Neither is validated against browser-side state before being passed through to the network stack.

Data flow (zero validation at every hop): Renderer → WebSocketConnectorImpl::Connect() (websocket_connector_impl.cc:123) → NetworkContext::CreateWebSocket() (network_context.cc:1948) → websocket_stream.cc:143 url_request_->set_site_for_cookies(site_for_cookies) → websocket_stream.cc:148-154 sets kStorageAccessGrantEligible override

A compromised renderer spoofs site_for_cookies to the target origin and storage_access_api_status to kAccessViaAPI, then opens a cross-site WebSocket. The network stack treats the connection as first-party with a Storage Access grant, bypassing third-party cookie blocking. SameSite=None cookies from the target are included in the handshake.

SameSite=Lax/Strict cookies are NOT affected — the browser-controlled initiator_origin still reflects the true cross-site context.

The codebase already has a browser-controlled alternative ready: network_context.mojom:1409-1411: "Currently, |isolation_info|'s SiteForCookies field is ignored, but it will eventually replace the |site_for_cookies| parameter."

Fix: use isolation_info.SiteForCookies() and derive storage_access_api_status from browser-side permission state.

Related: RestrictedCookieManager::ValidateAccessToCookiesAt() has the same trust issue — site_for_cookies mismatches are LOG(ERROR) only per crbug.com/402207912.

VERSION Chrome Version: 143.0.7499.192 stable Operating System: Linux (Kali 6.18.3) — bug is platform-independent

REPRODUCTION CASE See attached ws-cookie-bypass-poc.py.

Prerequisites:

  • Chromium 143+ installed (or set CHROMIUM=/path/to/chrome)
  • openssl CLI (for cert generation)
  • Python 3 + websockets (pip install websockets)
  • /etc/hosts: 127.0.0.1 example.test target-domain.example
  • Run: python3 ws-cookie-bypass-poc.py

Output: Phase 1 (control, unmodified forward): 0 cookies — correct Phase 2 (spoofed SFC + SAA status): session_none=LEAKED_NONE — bypass

The PoC uses MojoInterfaceInterceptor to capture a real Connect() message, modifies site_for_cookies and storage_access_api_status in-place, and forwards through a new WebSocketConnector pipe. Requires --enable-blink-features=MojoJS to simulate compromised renderer Mojo access.

Reporter Credit: Richard Belisle

The original report as published on the Chromium issue tracker, by Richard Belisle. 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 network stack trusted renderer-supplied site_for_cookies and storage access status parameters without checking them against browser-side state.

Impact

A compromised renderer could cause SameSite=None cookies from a target origin to be included in a cross-site WebSocket handshake, bypassing third-party cookie blocking; SameSite=Lax and Strict cookies were not affected.

What the attacker needed

Compromised renderer; Chrome 143 or later; MojoJS enabled; target uses SameSite=None cookies

The fix

The fix should use the browser-controlled isolation_info SiteForCookies field and derive the storage access status from browser-side permission state.

How it was found

  1. Set up host entries mapping the test and target domains to the local machine and generate a certificate.
  2. Run the proof-of-concept script, which intercepts a real Connect() message using MojoJS.
  3. Modify the site_for_cookies and storage access status values in place and forward them through a new connector pipe.
  4. Observe that the control run sends no cookies while the spoofed run leaks the SameSite=None cookie.

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.

Websites use cookies to remember who you are, and browsers have rules about when a cookie from one site may be sent while you are on another site. This report shows that a malicious page which has already taken over part of the browser's rendering process could lie about which site a WebSocket connection belongs to, so the browser would wrongly attach the target site's cookies. Only cookies marked SameSite=None were affected; stricter cookies were still protected.

What is CORS?

A permissive cross-origin policy lets another site read responses with the user's credentials.

More by Richard Belisle

View all

3 more disclosed reports, best first.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

CORS misconfiguration

The lesson behind this report.

A permissive cross-origin policy lets another site read responses with the user's credentials.