Insufficient validation of untrusted input in Input (CVE-2026-13866)
A compromised main frame renderer on Android can inject arbitrary text into a cross-origin out-of-process iframe (OOPIF) by abusing the text suggestion host, which caches a backend remote pointing to the currently focused frame but lets the main frame trigger the suggestion menu and supply its contents. This acts as a confused deputy, bypassing Site Isolation.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 3 months
Project Fortify, an experimental security project, has identified the following potential security issue.
Overview: A compromised main frame renderer can inject arbitrary text into a cross-origin OOPIF by exploiting a confused deputy flaw in TextSuggestionHostAndroid. The browser fails to isolate suggestion menu commands to the frame that requested them, allowing an attacker to spoof suggestions for a focused victim frame.
Affected files:
content/browser/android/text_suggestion_host_android.cccontent/browser/android/text_suggestion_host_android.hcontent/browser/browser_interface_binders.cccontent/browser/android/text_suggestion_host_mojo_impl_android.ccthird_party/blink/renderer/core/editing/suggestion/text_suggestion_controller.cc
Estimated timestamp from git blame: 2023-11-08
Summary
A vulnerability in TextSuggestionHostAndroid allows a compromised main frame renderer to perform cross-origin text injection into a victim out-of-process iframe (OOPIF). The flaw exists because the browser-side host caches a TextSuggestionBackend remote that points to the currently focused frame, but allows the main frame to trigger the suggestion menu and supply its contents. This acts as a confused deputy, resulting in a Site Isolation bypass where attacker-controlled text is injected into a cross-origin frame.
Technical Details
TextSuggestionHostAndroid is a per-WebContents object on Android that manages the native text suggestion menu. It maintains a mojo::Remote<blink::mojom::TextSuggestionBackend> member (text_suggestion_backend_) used to communicate with the renderer.
There are two primary issues that lead to this vulnerability:
- Improper Interface Binding:
BindTextSuggestionHostForFrameinbrowser_interface_binders.ccallows the main frame to bind theTextSuggestionHostinterface, but prevents OOPIFs from doing so (becauseRenderWidgetHostViewAndroid::FromRenderWidgetHostViewreturns null for child frames). This means the main frame can always send commands toTextSuggestionHostAndroid. - Confused Deputy in Backend Resolution: When
TextSuggestionHostAndroidneeds to communicate with the renderer (e.g., when a timer expires or a suggestion is selected), it callsGetTextSuggestionBackend(). If the backend is not yet bound, it binds it to the currently focused frame viaWebContentsImpl::GetFocusedFrame().
Because the attacker's main frame can invoke methods like StartSuggestionMenuTimer and ShowSpellCheckSuggestionMenu, it can force the browser to bind the backend to a focused victim OOPIF and then supply malicious text that the browser will route to that OOPIF.
Potential Attack Scenario
Note: These are suggested steps based on code analysis; our tooling agent does not yet have the ability to run code to verify this with a live exploit.
- A user visits a malicious site (the attacker) that embeds a victim site in an OOPIF. The victim site has an editable field with a misspelled word.
- The attacker's compromised main frame binds the
blink::mojom::TextSuggestionHostinterface. - The user taps the misspelled word in the victim OOPIF. This shifts the browser's focus to the victim OOPIF.
- The victim OOPIF attempts to bind the suggestion host to show a menu, but the browser drops the bind request because it is an OOPIF.
- The attacker's main frame, observing the focus change, calls
TextSuggestionHost::StartSuggestionMenuTimer(). - When the timer expires in the browser,
OnSuggestionMenuTimeout()callsGetTextSuggestionBackend(). Since the victim OOPIF is currently focused, the browser binds itstext_suggestion_backend_remote to the victim and sends aSuggestionMenuTimeoutCallbackto it. - The victim renderer processes this callback, placing an
ActiveSuggestionMarkeron the misspelled word. - The attacker's main frame then calls
ShowSpellCheckSuggestionMenu()with attacker-controlled strings. - The browser displays the native Android suggestion popup containing the attacker's text.
- When the user selects the suggestion, the browser calls
ApplySpellCheckSuggestion(). This method uses the cachedtext_suggestion_backend_(bound to the victim OOPIF) to send the replacement text. - The victim frame receives the command and replaces the misspelled word with the attacker's payload, successfully bypassing Site Isolation.
Suggested Fix
TextSuggestionHost should be refactored to be a true per-frame interface rather than a per-WebContents/per-RenderWidgetHostViewAndroid object.
Alternatively, TextSuggestionHostMojoImplAndroid should store the RenderFrameHost that bound it, and methods like ShowSpellCheckSuggestionMenu and StartSuggestionMenuTimer should verify that the requesting frame matches the currently focused frame before proceeding. The text_suggestion_backend_ should also be strictly tied to the frame that legitimately triggered the suggestion menu.
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
Likely, the browser-side TextSuggestionHostAndroid is a per-WebContents object that caches a TextSuggestionBackend remote bound to the currently focused frame, while allowing the main frame to trigger the suggestion menu and supply its contents, creating a confused deputy.
Impact
A compromised main frame renderer could inject arbitrary text into a cross-origin OOPIF, bypassing Site Isolation; the report notes the steps are suggested from code analysis and have not been verified with a live exploit.
What the attacker needed
Android browser; attacker controls main frame renderer; victim site embedded in OOPIF; victim field has misspelled word
The fix
TextSuggestionHost should be refactored to be a true per-frame interface, or the implementation should store the binding RenderFrameHost and verify that the requesting frame matches the currently focused frame before proceeding.
How it was found
- A user visits a malicious site that embeds a victim site in an OOPIF with an editable field containing a misspelled word.
- The attacker's main frame binds the TextSuggestionHost interface.
- The user taps the misspelled word in the victim OOPIF, shifting focus to it.
- The victim OOPIF's attempt to bind the suggestion host is dropped because it is an OOPIF.
- The attacker's main frame calls StartSuggestionMenuTimer; when it expires, the browser binds the backend to the focused victim OOPIF and sends a timeout callback.
- The attacker's main frame calls ShowSpellCheckSuggestionMenu with attacker-controlled strings, and when the user selects a suggestion, ApplySpellCheckSuggestion sends the replacement text to the victim frame.
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.
On Android, the browser shows a popup with spelling suggestions when you tap a misspelled word. The code that manages this popup is shared across the whole tab, and it remembers which frame was last focused. A malicious page in the main frame can trick the browser into showing a suggestion popup for a different, victim page embedded in the tab, and then make the victim page accept text chosen by the attacker. This breaks the rule that different websites in the same tab should be isolated from each other.
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.