Skip to content
CORS Advisory Advanced CVE-2026-95375

Incorrect authorization in BrowserTag (CVE-2026-95375)

The webViewInternal.loadDataWithBaseUrl API did not properly restrict the base_url parameter, allowing a compromised renderer to spoof a WebViewGuest's origin to a local network address. This let injected scripts bypass CORS and Private Network Access protections to exfiltrate data from unauthenticated local endpoints.

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 Chrome Security team.

Overview: A compromised WebUI renderer with access to webViewInternal can use loadDataWithBaseUrl to spoof a WebViewGuest's origin to a local network address. This allows the attacker to inject scripts that bypass Private Network Access (PNA) and CORS protections to exfiltrate data from unauthenticated local endpoints.

Affected files:

  • extensions/browser/api/guest_view/web_view/web_view_internal_api.cc
  • extensions/browser/extensions_browser_client.cc
  • extensions/browser/guest_view/web_view/web_view_guest.cc

Estimated timestamp from git blame: 2025-08-29

Description

A potential vulnerability in the webViewInternal extension APIs allows a compromised renderer (such as chrome-untrusted://lens) to perform origin spoofing and script injection within a WebViewGuest. This spoofing can be leveraged to bypass Private Network Access (PNA) protections and access sensitive local network resources.

Origin Spoofing via loadDataWithBaseUrl

In extensions/browser/api/guest_view/web_view/web_view_internal_api.cc, WebViewInternalLoadDataWithBaseUrlFunction::Run fails to properly restrict the base_url parameter. The browser process allows any valid URL with an http or https scheme to be used as a base URL without verifying it against the embedder's origin:

C++
  if (!base_url.is_valid() ||
      (!base_url.SchemeIsHTTPOrHTTPS() && !base_in_owner_origin)) {
    return RespondNow(ExtensionFunction::Error(
        "Invalid base URL \"*\".", base_url.possibly_invalid_spec()));
  }

Because base_url.SchemeIsHTTPOrHTTPS() evaluates to true for any http/https origin, the second half of the condition is bypassed. A compromised renderer can force the WebViewGuest to commit a data: URL document, but the resulting document will be assigned the spoofed base_url as its security origin.

Script Injection and PNA Bypass

The attacker can then inject arbitrary JavaScript into this spoofed origin using webViewInternal.executeScript. The script is evaluated in an isolated world within the guest renderer, but it inherits the spoofed main-world origin.

If the attacker spoofs a potentially trustworthy local network address (e.g., http://127.0.0.1:8080/), the injected script can issue fetch() requests to that exact address.

Because the request is same-origin with the spoofed document:

  1. CORS is bypassed: network::cors::ShouldCheckCors returns false for same-origin requests, so no preflight is issued.
  2. PNA is bypassed: LocalNetworkAccessChecker::CheckAddressSpace explicitly allows the request because it hits the kAllowedPotentiallyTrustworthySameOrigin exception, ignoring the fact that the document's IP address space is kUnknown (derived from the data: URL).

While WebViewGuest instances use an isolated storage partition, this does not mitigate the attack against local network endpoints that rely solely on the network boundary (PNA) rather than cookie-based authentication.

Potential Reproduction Steps

Note: Our tooling agent does not have the ability to run code. These are suggested steps to verify the vulnerability.

  1. From a compromised WebUI renderer that has access to the API (e.g., chrome-untrusted://lens), create a WebViewGuest using guestViewInternal.createGuest.
  2. Call webViewInternal.loadDataWithBaseUrl(guest_instance_id, 'data:text/html,<body>', 'http://127.0.0.1:8080/', 'http://127.0.0.1:8080/') to navigate the guest to a spoofed local origin.
  3. Verify the browser allows the navigation and the guest commits with the origin http://127.0.0.1:8080.
  4. Call webViewInternal.executeScript(guest_instance_id, 'http://127.0.0.1:8080/', {code: 'fetch("http://127.0.0.1:8080/secret").then(r => r.text()).then(t => parent.postMessage(t, "*"))'}).
  5. Verify that the fetch bypasses PNA and CORS, successfully reaching the local endpoint, and that the response is sent back to the embedder.

Suggested Fix

In WebViewInternalLoadDataWithBaseUrlFunction::Run, the validation logic should be tightened to restrict base_url. It should either enforce that base_url is same-origin with the embedder (base_in_owner_origin), or enforce strict ChildProcessSecurityPolicy checks to prevent the embedder from spoofing origins it does not possess privileges for.

For example:

C++
  if (!base_url.is_valid() || !base_in_owner_origin) {
    // ... error handling
  }

Evaluated with Chrome root at commit: 096fc8fdbfacf2546485756d03f160a3d04fcc9b


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.

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 validation of base_url only checked that it was a valid HTTP/HTTPS URL, not that it matched the embedder's origin, so any HTTP/HTTPS URL was accepted.

Impact

An attacker could bypass CORS and PNA to read data from unauthenticated local network endpoints, though the isolated storage partition limits cookie-based attacks.

What the attacker needed

Compromised WebUI renderer; access to webViewInternal API; local network endpoint without auth

The fix

The validation should be tightened to require that base_url is same-origin with the embedder, or to enforce strict ChildProcessSecurityPolicy checks.

How it was found

  1. From a compromised WebUI renderer with API access, create a WebViewGuest using guestViewInternal.createGuest.
  2. Call webViewInternal.loadDataWithBaseUrl with a data: URL and a local network base_url to navigate the guest to a spoofed origin.
  3. Verify the browser allows the navigation and the guest commits with the spoofed origin.
  4. Call webViewInternal.executeScript to inject a fetch request to the local endpoint.
  5. Verify the fetch bypasses PNA and CORS, reaches the local endpoint, and the response is sent back to the embedder.

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 can normally only talk to other pages on the same site, and browsers block requests to local network devices for safety. Here, a bug let a malicious page pretend to be a local device, so it could read data from that device without permission.

What is CORS?

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

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.