Missing authorization in Sensor (CVE-2026-79104)
The browser process brokers a direct Mojo connection for Generic Sensors between a renderer and the Device Service without retaining control of the pipe. A compromised renderer could bypass visibility/focus gating, BFCache suspension, and permission revocation to continuously monitor sensitive motion data in the background or across cross-origin navigations.
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: The browser process brokers a direct Mojo connection for Generic Sensors between a renderer and the Device Service without retaining control of the pipe. This potentially allows a compromised renderer to bypass visibility/focus gating, BFCache suspension, and permission revocation. An attacker could thereby continuously monitor sensitive motion data in the background or across cross-origin navigations.
Affected files:
content/browser/generic_sensor/frame_sensor_provider_proxy.cccontent/browser/generic_sensor/web_contents_sensor_provider_proxy.ccservices/device/generic_sensor/sensor_provider_impl.ccservices/device/generic_sensor/sensor_impl.ccthird_party/blink/renderer/modules/sensor/sensor_proxy.cc
Estimated timestamp from git blame: 2023-10-18
Vulnerability Details
The Generic Sensor API implementation currently suffers from a structural flaw where the browser process fails to retain control over sensor pipes after they are brokered to a renderer.
When a renderer requests a sensor, content::FrameSensorProviderProxy::GetSensor() performs a one-time permission and policy check. Upon success, it simply forwards the renderer's Mojo callback to the Device Service (services/device/generic_sensor/sensor_provider_impl.cc). The Device Service creates a device::SensorImpl instance, bounds it to a mojo::UniqueReceiverSet<mojom::Sensor>, and returns a direct mojom::Sensor pipe and a shared-memory region handle directly to the renderer.
Crucially, neither FrameSensorProviderProxy nor WebContentsSensorProviderProxy retains a reference to this mojom::Sensor pipe. This architectural hand-off leads to several severe privacy mitigation bypasses:
- Visibility and Focus Gating Bypass: The Generic Sensor specification requires that sensors only provide data to visible, focused frames. This is currently enforced entirely client-side by the renderer (
blink::SensorProxy::ShouldSuspendUpdates()). The Device Service'sSensorImplblindly trustsResume()andSuspend()calls from the renderer. A compromised renderer can simply callResume()and ignore visibility state. - Permission Revocation Bypass: Because the browser proxy does not retain the brokered sensor pipes, it cannot close them if the user later revokes the site's "Sensors" permission. The direct pipe to the Device Service remains active.
- Navigation and BFCache Bypass: When a document is destroyed or enters the BFCache,
FrameSensorProviderProxyis destroyed (as it is aDocumentUserData). However, destroying the proxy only severs the brokeringWebSensorProviderpipe. The actualSensorImplin the Device Service remains fully alive because its lifetime is tied to the renderer holding themojom::Sensorremote.
Suggested Attacker Steps
(Note: These are potential steps based on code analysis; our tooling agent does not yet have the ability to run code to produce a working PoC.)
- Achieve code execution within a sandboxed renderer process (e.g., via a separate V8 or Blink vulnerability).
- Construct a Mojo request to
blink::mojom::WebSensorProvider::GetSensor()for a sensitive sensor likeACCELEROMETER. - Because the page is active and motion sensors often default to allowed, the browser process's initial permission check passes.
- Receive the
device::mojom::SensorInitParamsresponse, which contains a directmojom::Sensorremote to the Device Service and a read-only handle to the sensor's shared memory buffer. - Call the
Resume()method on themojom::Sensorremote to instruct the Device Service to start polling the hardware. - Intentionally ignore any backgrounding, visibility loss, or focus loss events. Do not call
Suspend()on the remote. - Continue to read high-resolution motion data from the shared memory buffer indefinitely, even after the user navigates away or revokes permissions, enabling persistent side-channel attacks (e.g., keystroke inference).
Suggested Fix
To resolve this, the browser process must act as the authoritative gatekeeper for the lifetime and state of active sensors:
- Active Proxying or Tracking:
FrameSensorProviderProxyshould either actively proxy thedevice::mojom::Sensorinterface (interceptingSuspend/Resumeand sensor data notifications) or track the returned pipes so they can be forcefully disconnected. - Browser-side State Enforcement: The browser process should independently monitor the
WebContentsvisibility, focus state, andPermissionControllerstatus. When a frame loses visibility/focus, or if permissions are revoked, the browser should forcefully suspend or disconnect the tracked sensor pipes, rather than relying on the untrusted renderer to do so voluntarily.
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
The browser process fails to retain control over sensor pipes after brokering them to a renderer, relying on the renderer to enforce visibility, focus, and permission revocation.
Impact
A compromised renderer could continuously monitor sensitive motion data in the background or across cross-origin navigations, enabling persistent side-channel attacks such as keystroke inference.
What the attacker needed
Compromised renderer process; sensor permission granted or default-allowed
The fix
The browser process should act as the authoritative gatekeeper by actively proxying or tracking the sensor pipes and forcefully suspending or disconnecting them when visibility, focus, or permissions change.
How it was found
- Achieve code execution within a sandboxed renderer process.
- Construct a Mojo request to get a sensitive sensor like an accelerometer.
- The browser process's initial permission check passes because the page is active.
- Receive a direct sensor remote and a shared-memory buffer handle.
- Call Resume() on the sensor remote to start polling the hardware.
- Ignore backgrounding, visibility loss, or focus loss events and keep reading motion data.
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 ask the browser for sensor data like motion or acceleration. Normally the browser checks if the page is visible and focused, and stops the data if you switch tabs or revoke permission. Here, the browser hands over a direct connection to the sensor service and then forgets about it, so a malicious page that has already taken over the browser's rendering process could keep receiving sensor data even when it should be stopped.
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.