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

Race condition in SiteIsolation (CVE-2026-113239)

A race condition in Chrome for Android's handling of images inserted from the keyboard (IME) lets a malicious main frame steal focus during the asynchronous file read, so the image bytes are delivered to the attacker's frame instead of the intended cross-origin iframe. The attacker can then read the user's private image via a paste event.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 6 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 without the security team.

Overview: A potential Time-of-Check to Time-of-Use (TOCTOU) vulnerability exists in Android's commitContent implementation. By shifting focus during the background file-read process, a malicious main frame can route image data intended for a cross-origin iframe to itself. This bypasses security checks and leaks user-selected media to the attacker.

Affected files:

  • content/browser/android/ime_adapter_android.cc
  • content/public/android/java/src/org/chromium/content/browser/input/ImeAdapterImpl.java
  • content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java
  • third_party/blink/renderer/core/frame/web_frame_widget_impl.cc

Estimated timestamp from git blame: 2026-03-03

Description

A potential Time-of-Check to Time-of-Use (TOCTOU) vulnerability exists in the way Chrome for Android handles rich media insertion from the IME (e.g., Gboard).

When a user selects an image to insert into a richly editable element, Chrome validates the target frame's supported MIME types and then initiates an asynchronous background task to read the file via Android's ContentResolver (ThreadedInputConnection.commitContent). Because this I/O operation can be slow (tens to hundreds of milliseconds), a race window is created.

During this window, a malicious top-level main frame can programmatically steal focus from a cross-origin victim iframe. (Main frames are exempt from user activation restrictions when calling .focus() on their own elements). When the background read finishes, the image bytes are routed to the currently focused frame (ImeAdapterAndroid::InsertMediaFromBytes), delivering the sensitive data to the attacker instead of the victim.

Finally, because WebFrameWidgetImpl::PasteFromImageBytes hardcodes is_accessible_from_start_frame = true when creating the DataObject, cross-origin clipboard restrictions are bypassed, allowing the attacker's script to read the user's private image.

Note: These are potential steps and analysis, as our tooling agent does not yet have the ability to run code to produce a live proof of concept.

Potential Steps to Trigger

  1. Host a malicious top-level page (attacker.com) that embeds a cross-origin victim page (victim.com) containing a contenteditable element.
  2. In the attacker page, run a continuous background loop (e.g., via setInterval) that calls .focus() on a hidden local input element.
  3. The user interacts with the page, tapping the victim's editable element. This focuses the victim frame and opens the Android keyboard.
  4. The user selects a large media file (like an animated GIF) from the keyboard to insert into the victim's chat/editor.
  5. Chrome verifies the victim frame supports images and starts the background file read.
  6. During the read, the attacker's .focus() loop successfully steals focus back to the main frame.
  7. The background read finishes and routes the image data to the attacker's frame.
  8. The attacker intercepts the resulting paste event, calls event.preventDefault(), and reads the image data via event.clipboardData.items[0].getAsFile() to exfiltrate it.

Suggested Fix

  1. Bind to the Original Target: When commitContent is initiated, capture the intended destination frame (e.g., its FrameTreeNode ID or a WeakPtr to the specific RenderWidgetHostImpl). When the background read completes, verify that the current focused frame matches the original target before dispatching the PasteFromImageBytes IPC.
  2. Cancel In-Flight Tasks: Implement the closeConnection() method in ThreadedInputConnection.java (currently an empty stub with a TODO) to properly cancel or invalidate pending background file reads when the IME connection is torn down due to a focus shift.

Evaluated with Chrome root at commit: 137d451a126685dd5010e6609db9f6d4a78d8234


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. 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 code checks which frame should receive the image before the asynchronous file read, but delivers the bytes to whichever frame has focus when the read finishes, without re-checking the original target.

Impact

A malicious page could steal a user-selected image intended for another site, though the report notes this is a potential issue without a live proof of concept.

What the attacker needed

Chrome for Android; victim uses keyboard to insert an image; attacker page embeds a cross-origin editable iframe

How it was found

  1. Host a malicious page that embeds a cross-origin victim page with an editable element.
  2. Run a loop in the attacker page that repeatedly focuses a hidden local input.
  3. The user taps the victim's editable element, focusing it and opening the keyboard.
  4. The user picks a large media file from the keyboard to insert.
  5. Chrome starts the background file read; the attacker's focus loop steals focus back.
  6. The read finishes, the image goes to the attacker's frame, and the attacker reads it from the paste event.

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.

When you pick an image from your phone's keyboard to insert into a web page, Chrome reads the file in the background. This report says a malicious page can grab keyboard focus during that short wait, so the image ends up in the attacker's page instead of the page you meant. The attacker's script can then read the image.

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.