Insufficient validation of untrusted input in Extensions (CVE-2026-10912)
A compromised renderer could spoof its origin when registering for Extension EventRouter events via Mojo, bypassing origin and context type restrictions. This allowed interception of sensitive API events such as fileSystemProvider and sockets.tcp intended for privileged contexts like chrome-untrusted://terminal/.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 2 months
Project Fortify, an experimental security project, has identified the following potential security issue.
Overview: A compromised renderer can spoof its origin when registering for Extension EventRouter events via Mojo. This allows an attacker to bypass origin and context type restrictions, intercepting sensitive API events (e.g., fileSystemProvider, sockets.tcp) intended for privileged contexts like chrome-untrusted://terminal/.
Affected files:
extensions/browser/events/event_dispatch_helper.ccextensions/browser/event_router.ccextensions/browser/process_map.ccchrome/browser/ash/file_system_provider/request_dispatcher_impl.cc
Estimated timestamp from git blame: 2024-08-01
Summary
A vulnerability in the Extensions EventRouter allows a compromised renderer process to spoof its origin during event listener registration. By providing an arbitrary listener_url to the mojom::EventRouter::AddListenerForMainThread Mojo interface, the renderer can bypass origin-based event restrictions and context type validation. This allows the attacker to intercept sensitive events, such as file system operations (fileSystemProvider) and raw socket data (sockets.tcp), intended for specific WebUI contexts like the ChromeOS Terminal app.
Note: These are potential steps and findings as our setup does not currently have the ability to run code or provide a working proof of concept.
Technical Details
- Lack of Origin Validation in Event Registration:
The mojom::EventRouter interface is exposed to all render frames (via ChromeContentBrowserClientExtensionsPart::ExposeInterfacesToRendererForRenderFrameHost). In extensions/browser/event_router.cc, the AddListenerForMainThread method accepts the listener_url provided by the renderer without validating that the renderer's ChildProcessSecurityPolicy is authorized for that origin. It only verifies that the URL is syntactically valid.
- Origin Restriction Bypass:
When sensitive events are dispatched using DispatchEventToURL(restrict_to_url, event) (e.g., from RequestDispatcherImpl::DispatchRequest for the Terminal app), the system checks if the listener's origin matches the restriction. In extensions/browser/events/event_dispatch_helper.cc, ListenerMeetsRestrictions compares the restrict_to_url against the spoofed listener->listener_url(). Because both origins match (chrome-untrusted://terminal/), this check incorrectly passes.
- Context Type Misclassification:
During dispatch, EventDispatchHelper calls ProcessMap::GetMostLikelyContextType (extensions/browser/process_map.cc) to determine the context type. Because the listener was added via URL (meaning the extension pointer is null), GetMostLikelyContextType bases its decision entirely on the scheme of the spoofed URL. Seeing the chrome-untrusted:// scheme, it returns mojom::ContextType::kUntrustedWebUi, bypassing any validation against the actual process's site instance.
- Feature Availability Bypass:
With the origin matching and the context misclassified as kUntrustedWebUi, EventDispatchHelper::CheckFeatureAvailability consults _api_features.json. Since APIs like fileSystemProvider and sockets.tcp are allowed for kUntrustedWebUi contexts matching chrome-untrusted://terminal/*, the check succeeds. The sensitive event data is then dispatched via IPC to the attacker's compromised regular web renderer process.
Potential Attacker Steps to Trigger the Vulnerability
- Gain arbitrary code execution within a regular web renderer process (e.g., browsing
https://evil.com). - Use Mojo to bind the
mojom::EventRouterinterface, which is exposed to all render frames. - Send an
AddListenerForMainThreadIPC message. Set theevent_nameto a sensitive API event (e.g.,fileSystemProvider.onReadFileRequestedorsockets.tcp.onReceive) and spoof thelistener_ownerURL tochrome-untrusted://terminal/. - Wait for a legitimate system action to trigger the event (e.g., the user interacts with an SFTP mount in the ChromeOS Terminal).
- The browser process will dispatch the event containing sensitive cross-origin data directly to the compromised renderer process, bypassing the sandbox.
Suggested Fix
Add origin validation in EventRouter::AddListenerForMainThread and EventRouter::AddListenerForServiceWorker when processing a listener_url. Specifically, before calling AddEventListenerForURL, verify that the RenderProcessHost is authorized to commit or represent the provided listener_url (e.g., using ChildProcessSecurityPolicy::GetInstance()->CanCommitURL(process_id, listener_url)). Additionally, ProcessMap::GetMostLikelyContextType could be hardened to verify the actual process type when extension is null, rather than relying solely on the URL scheme.
Evaluated with Chrome root at commit: 0eb4855bda702feaaa8b899336664f97e3df88b8
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. Please feel free to reach out to me if you have concerns or feedback.
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 EventRouter accepted a renderer-supplied listener URL without checking that the renderer's process was actually authorised for that origin, and context type was inferred from the URL scheme alone.
Impact
A compromised renderer could intercept sensitive cross-origin events such as file system operations and raw socket data, bypassing the sandbox; the report notes no working proof of concept was run.
What the attacker needed
Compromised renderer process; ability to send Mojo IPC messages; a legitimate event trigger
The fix
Origin validation should be added in EventRouter when processing a listener URL, checking that the render process is authorised for that URL, and context type determination should be hardened.
How it was found
- Gain arbitrary code execution within a regular web renderer process.
- Use Mojo to bind the mojom::EventRouter interface.
- Send an AddListenerForMainThread message with a sensitive event name and a spoofed listener URL.
- Wait for a legitimate system action to trigger the event.
- The browser dispatches the sensitive event to the compromised renderer.
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 restricted part of the browser called a renderer. If an attacker can take over that renderer, they should still be blocked from listening to private browser events. Here, the browser trusted a fake address supplied by the renderer, so the attacker could receive sensitive data meant for a different, more trusted part of the browser.
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.