Missing authorization in LocalNetworkAccess (CVE-2026-87557)
A compromised renderer can spoof the final response URL of a worker via a Service Worker FetchAPIResponse, bypassing Local Network Access restrictions and causing UI spoofing. The browser fails to validate the URL, allowing the worker to adopt a privileged scheme and gain loopback address space.
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.
Overview: A compromised renderer can spoof the final response URL of a dedicated or shared worker by providing a malicious URL list in a Service Worker FetchAPIResponse. Because the browser lacks a CanCommitURL validation for this URL, it can be exploited to derive a kLoopback IP address space. This potentially allows the worker to bypass Local Network Access (LNA) restrictions and spoof its identity in the browser UI.
Affected files:
content/browser/worker_host/dedicated_worker_host.cccontent/browser/worker_host/shared_worker_host.cccontent/browser/worker_host/shared_worker_service_impl.cccontent/browser/worker_host/worker_script_fetcher.ccthird_party/blink/common/service_worker/service_worker_loader_helpers.cc
Estimated timestamp from git blame: 2024-05-07
Description
There is a potential vulnerability in the initialization of Dedicated and Shared Workers when their main script fetch is intercepted by a Service Worker.
When a Service Worker responds to a fetch event, the renderer process sends a FetchAPIResponse IPC to the browser. The url_list field in this response is copied without validation and used to determine the worker's final_response_url.
Crucially, the browser process (in DedicatedWorkerHost::DidStartScriptLoad and SharedWorkerServiceImpl::DidStartScriptLoad) fails to perform a ChildProcessSecurityPolicy::CanCommitURL check on this provided URL. This omission is explicitly noted in the codebase as TODO(crbug.com/41471904).
If an attacker provides a file:// or chrome:// URL, the worker adopts this URL. Under specific conditions—such as when a Service Worker registration is restored from an older database and its policy_container_host is null (documented in crbug.com/339200481)—the browser falls back to calculating the IP Address Space from the spoofed URL's scheme. This causes the worker to be assigned the kLoopback address space, entirely bypassing Local Network Access (LNA) restrictions for subsequent subresource fetches. Additionally, the spoofed URL is broadcasted to Chrome's Task Manager, DevTools, and COEP reports, leading to UI spoofing.
Note: Our tooling agent has identified this via static analysis. The following are potential steps to trigger the issue, as we do not yet have a working, executed proof of concept.
Potential Steps to Reproduce
- Renderer Compromise: An attacker exploits a vulnerability in a renderer process hosting
https://attacker.comand an active Service Worker. - Trigger Edge Case: The attacker triggers a state where the Service Worker's
policy_container_hostis null (e.g., by forcing the browser to restore the registration from an older database profile). - Worker Creation: The compromised renderer executes JavaScript to spawn a new Dedicated Worker:
new Worker('worker.js'). - Service Worker Interception: The browser routes the
worker.jsfetch request to the compromised renderer's Service Worker. - Spoofing the Response: The compromised renderer crafts a malicious
FetchAPIResponseIPC message, setting theurl_listto contain a highly privileged URL likefile:///etc/passwdorchrome://settings. - Missing Validation: In the browser process,
ServiceWorkerLoaderHelpers::SaveResponseInfocopies this unvalidated list.WorkerScriptFetcher::DetermineFinalResponseUrlextracts the spoofedfile://URL. - Address Space Calculation:
DedicatedWorkerHost::DidStartScriptLoaduses this URL to calculate the worker's IP address space. Because the Service Worker's policy container is null,CalculateIPAddressSpacefalls back to URL scheme derivation. - LNA Bypass: The
file://scheme causes the network service to returnkLoopback(services/network/public/cpp/ip_address_space_util.cc:432). The worker is granted loopback privileges. - Exploitation: The attacker-controlled worker executes a
fetch()tohttp://127.0.0.1:8080. TheLocalNetworkAccessCheckerobserves both the source and target address spaces askLoopbackand allows the request, bypassing LNA protections.
Code Pointers
third_party/blink/common/service_worker/service_worker_loader_helpers.cc:120: The unvalidatedurl_listis copied.content/browser/worker_host/worker_script_fetcher.cc:670-672: The last URL in the list is adopted as thefinal_response_url.content/browser/worker_host/dedicated_worker_host.cc:439-441: Thefinal_response_urlis saved without validation. An explicitTODO(crbug.com/41471904): Check if the main script's final response URL is committableis present here.content/browser/renderer_host/local_network_access_util.cc:296-314: The IP Address space falls back to URL scheme derivation if the Service Worker's inherited address space is missing or unknown.
Suggested Fix
Implement the CanCommitURL validation check inside DedicatedWorkerHost::DidStartScriptLoad and SharedWorkerServiceImpl::DidStartScriptLoad as noted in crbug.com/41471904. If the renderer provides a final response URL that it does not have permission to commit, the browser process should terminate the renderer (e.g., via bad_message::ReceivedBadMessage) and abort the worker load.
Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0
Results from 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.
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 browser process does not perform a CanCommitURL check on the final response URL provided by the renderer for worker scripts, as noted in a TODO.
Impact
This could allow a compromised renderer to bypass Local Network Access restrictions and access loopback services, and may cause UI spoofing in browser interfaces.
What the attacker needed
Compromised renderer; active Service Worker; policy_container_host is null
The fix
The browser should implement a CanCommitURL validation check in the worker host code and terminate the renderer if the URL is not committable.
How it was found
- Compromise a renderer hosting a site with an active Service Worker.
- Trigger a state where the Service Worker's policy_container_host is null.
- Spawn a new Dedicated Worker from the compromised renderer.
- Intercept the worker script fetch with the Service Worker.
- Craft a FetchAPIResponse with a privileged URL in url_list.
- The browser uses the spoofed URL to assign kLoopback address space, bypassing LNA.
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 worker is a background script in a browser. A compromised renderer (a part of the browser that runs web content) can lie about the address of a worker's script. Because the browser does not check this address, the worker can pretend to be a local file and then access services on the user's own computer that should be off-limits.
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.