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.cccontent/public/android/java/src/org/chromium/content/browser/input/ImeAdapterImpl.javacontent/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.javathird_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
- Host a malicious top-level page (
attacker.com) that embeds a cross-origin victim page (victim.com) containing acontenteditableelement. - In the attacker page, run a continuous background loop (e.g., via
setInterval) that calls.focus()on a hidden local input element. - The user interacts with the page, tapping the victim's editable element. This focuses the victim frame and opens the Android keyboard.
- The user selects a large media file (like an animated GIF) from the keyboard to insert into the victim's chat/editor.
- Chrome verifies the victim frame supports images and starts the background file read.
- During the read, the attacker's
.focus()loop successfully steals focus back to the main frame. - The background read finishes and routes the image data to the attacker's frame.
- The attacker intercepts the resulting
pasteevent, callsevent.preventDefault(), and reads the image data viaevent.clipboardData.items[0].getAsFile()to exfiltrate it.
Suggested Fix
- Bind to the Original Target: When
commitContentis initiated, capture the intended destination frame (e.g., itsFrameTreeNodeID or aWeakPtrto the specificRenderWidgetHostImpl). When the background read completes, verify that the current focused frame matches the original target before dispatching thePasteFromImageBytesIPC. - Cancel In-Flight Tasks: Implement the
closeConnection()method inThreadedInputConnection.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.
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
- Host a malicious page that embeds a cross-origin victim page with an editable element.
- Run a loop in the attacker page that repeatedly focuses a hidden local input.
- The user taps the victim's editable element, focusing it and opening the keyboard.
- The user picks a large media file from the keyboard to insert.
- Chrome starts the background file read; the attacker's focus loop steals focus back.
- 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.