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

Race condition in USB (CVE-2026-76044)

A race condition in Chrome's WebUSB code lets a compromised renderer change a USB device's configuration and then immediately issue a transfer that is checked against the old configuration. This could let it talk to protected USB interface classes such as HID, which the text describes as a potential sandbox escape.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 2 months

Flapjack, 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: A Time-of-Check to Time-of-Use (TOCTOU) race condition exists in the WebUSB DeviceImpl class. Configuration-altering methods set a state change flag, but data transfer methods fail to check this flag before performing synchronous permission checks against stale configuration data. By pipelining a configuration change with transfer requests over Mojo, a compromised renderer could bypass interface class protections and communicate with protected USB interfaces.

Affected files:

  • services/device/usb/mojo/device_impl.cc
  • services/device/usb/usb_device_handle_impl.cc

Estimated timestamp from git blame: 2026-05-11

Summary

A Time-of-Check to Time-of-Use (TOCTOU) vulnerability exists in the WebUSB implementation in Chrome. The DeviceImpl class fails to check the device_state_change_in_progress status in its data transfer methods. This allows a compromised renderer to bypass interface class protections (e.g., WebUsbProtectedClassControlTransferBlock) by pipelining a SetConfiguration request followed immediately by transfer requests over the Mojo IPC pipe.

Vulnerability Details

When a SetConfiguration request is made through WebUSB, the DeviceImpl::SetConfiguration method (services/device/usb/mojo/device_impl.cc) initiates a configuration change. To prevent races, it sets a flag (device_->set_state_change_in_progress(true)) that blocks subsequent conflicting operations like ClaimInterface or Reset.

However, this flag is not checked in the following data transfer methods:

  • ControlTransferIn / ControlTransferOut
  • GenericTransferIn / GenericTransferOut
  • IsochronousTransferIn / IsochronousTransferOut

When a transfer method like ControlTransferOut is called, it performs synchronous permission checks using HasControlTransferPermission. This function retrieves the active configuration using device_->GetActiveConfiguration(). If a SetConfiguration task is currently pending in the background, GetActiveConfiguration() still returns the stale, old configuration.

Potential Exploitation Steps

Our tooling agent cannot currently run code to provide a working PoC, but the theoretical attack flow is as follows:

  1. Prerequisites: A compromised renderer connects directly to the device::mojom::UsbDevice Mojo interface, bypassing client-side blink constraints. A target USB device is attached that supports at least two configurations: Config A (no protected interfaces) and Config B (contains a protected interface class like HID).
  2. Pipelining IPC: The attacker pipelines two Mojo messages sequentially without waiting for replies: SetConfiguration(Config B) followed instantly by ControlTransferOut targeting an index belonging to the protected interface in Config B.
  3. State Check Bypass: The browser processes SetConfiguration, setting the state change flag, and posts the actual configuration change to the backend. It immediately processes ControlTransferOut.
  4. Time-of-Check Bypass: ControlTransferOut fails to check the state change flag. HasControlTransferPermission evaluates the transfer against the stale Config A. Because Config A does not identify the target as a protected class, permission is granted.
  5. Time-of-Use Exploitation:
    • On macOS (libusb): The configuration change (SetConfigurationBlocking) and the transfer submission (Transfer::Submit) are posted sequentially to the exact same background sequence (blocking_task_runner_). This guarantees the device physically switches to Config B before the transfer is submitted to the OS, routing the payload directly to the protected interface.
    • On Linux/Android (usbfs): The configuration change hops to a background helper thread, while the control transfer is submitted synchronously via ioctl on the main thread. This introduces a race condition, but still allows exploitation under favorable thread scheduling.

Impact

This vulnerability potentially allows a compromised renderer to bypass WebUSB security boundaries and communicate with protected USB interface classes (e.g., HID, Mass Storage). This constitutes a potential sandbox escape.

Suggested Fix

Add a check for device_->state_change_in_progress() at the beginning of all transfer methods in DeviceImpl (services/device/usb/mojo/device_impl.cc). If the flag is set, the method should return an error and report a bad message, consistent with the existing implementation of ClaimInterface and Reset.

C++
if (device_->state_change_in_progress()) {
  mojo::ReportBadMessage("Device state change in progress.");
  std::move(callback).Run(mojom::UsbTransferStatus::PERMISSION_DENIED, {});
  return;
}

Evaluated with Chrome root at commit: 2155cb00003ec35716a76ed3246eae995f87b7ff


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

The data transfer methods in DeviceImpl do not check the state-change-in-progress flag, so their permission check can run against a stale active configuration while a configuration change is pending.

Impact

A compromised renderer could bypass WebUSB protections and reach protected interface classes, which the text calls a potential sandbox escape; on Linux and Android the timing race makes success depend on thread scheduling.

What the attacker needed

Compromised renderer; USB device with two configurations; one configuration has a protected interface

The fix

The transfer methods should check the state-change flag first and reject the request as a bad message, as ClaimInterface and Reset already do.

How it was found

  1. Have a compromised renderer talk to the USB Mojo interface directly, with a device attached that has one configuration without protected interfaces and one with a protected interface.
  2. Send a configuration change to the protected configuration and, without waiting, send a control transfer aimed at the protected interface.
  3. The browser sets the state-change flag and queues the real change, then handles the transfer, which skips the flag check.
  4. The permission check runs against the old configuration, which does not mark the target as protected, so permission is granted.
  5. The queued configuration change completes before the transfer reaches the device, so the transfer lands on the protected interface.

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 USB device can have several setups, called configurations, and some interfaces in them are meant to be off-limits to web pages. Chrome checks permissions before allowing a transfer, but if the setup is being changed at the same moment, the check can look at the old setup and wrongly allow the transfer. The report says this was found by an automated tool and no working proof was built.

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.