Skip to content
Race condition Advisory Advanced CVE-2026-113059

Race condition in Sensor (CVE-2026-113059)

A race condition and COM apartment violation in Chromium's legacy Windows sensor code allow concurrent access to a non-thread-safe COM object, potentially causing heap corruption in the unsandboxed browser process. A compromised renderer could exploit this to escape the sandbox.

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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: PlatformSensorReaderWin32 performs cross-apartment COM calls to an ISensor interface without proper marshaling, violating the COM apartment model. Additionally, a race condition exists between the browser UI thread and a background COM thread when accessing the ISensor object. This unsynchronized concurrent access to a non-thread-safe COM object can lead to heap corruption in the unsandboxed browser process.

Affected files:

  • services/device/generic_sensor/platform_sensor_reader_win.cc
  • services/device/generic_sensor/platform_sensor_win.cc
  • services/device/generic_sensor/platform_sensor_provider_win.cc

Estimated timestamp from git blame: 2018-10-02

Background

In Chromium's legacy Win32 sensor implementation (services/device/generic_sensor/), PlatformSensorReaderWin32 manages an ISensor COM interface pointer. This pointer is obtained on a dedicated ThreadPool COM Single-Threaded Apartment (STA) thread to comply with the COM apartment model requirements of the Windows Sensor API.

Root Cause Analysis

A potential security vulnerability exists due to a combination of a COM apartment model violation and a race condition in the browser process:

  1. Cross-Apartment COM Violation: The ISensor pointer is created on a background STA thread but is subsequently used from the browser UI thread (a different STA) without any COM marshaling (e.g., via CoMarshalInterface or the Global Interface Table). Chromium's own documentation in base/task/thread_pool.h warns that "COM pointers are not smuggled across apartments," yet methods like StartSensor and StopSensor perform direct vtable calls (e.g., sensor_->SetProperties() and sensor_->SetEventSink(nullptr)) on the UI thread.

  2. Race Condition: PlatformSensorReaderWin32::StartSensor (running on the UI thread) posts a task to ListenSensorEvent on the background COM thread. ListenSensorEvent calls sensor_->SetEventSink(event_listener_.Get()) without holding the internal lock_. Simultaneously, StopSensor (on the UI thread) may call sensor_->SetEventSink(nullptr) while holding the lock. Because ListenSensorEvent bypasses the lock, both threads can execute concurrent calls against the underlying COM object.

Since legacy COM objects for the Sensor API (sensorsapi.dll) are typically apartment-threaded and do not implement internal locking, this concurrent, cross-apartment access results in undefined behavior and heap corruption.

Impact

This issue affects the unsandboxed browser process. A compromised renderer can potentially exploit this heap corruption to achieve a sandbox escape. This code path is primarily reached on Windows 10 versions prior to 19H1 that utilize the legacy Win32 sensor implementation and possess hardware sensors.

Potential Reproduction Steps

Note: These steps are suggested based on code analysis; our current environment does not support running a full proof-of-concept.

  1. Use a Windows 10 device (version < 19H1) with a hardware accelerometer.
  2. From a compromised renderer, bind to blink.mojom.WebSensorProvider to obtain a device.mojom.Sensor remote.
  3. Rapidly and repeatedly call AddConfiguration and RemoveConfiguration via the Mojo pipe.
  4. This will trigger the race between SetEventSink on the background thread and SetProperties/SetEventSink on the UI thread.
  5. Monitor the browser process for heap corruption or crashes in sensorsapi.dll using a debugger or Application Verifier.

Suggested Fix

To resolve this issue, all calls to the ISensor interface should be serialized on the dedicated background COM STA thread. The UI thread should post tasks to that thread rather than calling sensor_ methods directly. Furthermore, ListenSensorEvent must be modified to either acquire lock_ or be appropriately synchronized with the sensor lifecycle methods to prevent concurrent access.

Evaluated with Chrome root at commit: b3153093eb3c78c3e88ccf562bcbc20437a04b0e


Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:

  • If you are familiar with the severity guidelines, you may adjust the severity.
  • If this is a false positive, and there's no work to be done, please close as WAI.
  • If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.

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

Likely the ISensor COM pointer is used across COM apartments without marshaling, and ListenSensorEvent calls SetEventSink without holding the lock, allowing concurrent access with StopSensor.

Impact

A compromised renderer could potentially exploit this heap corruption to achieve a sandbox escape, but only on Windows 10 versions prior to 19H1 with hardware sensors.

What the attacker needed

Windows 10 version < 19H1; Hardware accelerometer present; Compromised renderer

The fix

All calls to the ISensor interface should be serialized on the dedicated background COM STA thread, and ListenSensorEvent must acquire the lock or be synchronized with sensor lifecycle methods.

How it was found

  1. Use a Windows 10 device (version < 19H1) with a hardware accelerometer.
  2. From a compromised renderer, bind to blink.mojom.WebSensorProvider to obtain a device.mojom.Sensor remote.
  3. Rapidly and repeatedly call AddConfiguration and RemoveConfiguration via the Mojo pipe.
  4. This triggers the race between SetEventSink on the background thread and SetProperties/SetEventSink on the UI thread.
  5. Monitor the browser process for heap corruption or crashes in sensorsapi.dll using a debugger or Application Verifier.

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.

This report describes a bug in how Chromium talks to hardware sensors on older Windows 10. Two parts of the program can try to use the same sensor object at the same time without proper coordination, which can corrupt memory. Because this happens in the part of the browser that is not sandboxed, an attacker who already controls a web page could potentially use it to break out of the sandbox.

What is Race condition?

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.