Insufficient validation of untrusted input in ReadingMode (CVE-2026-8536)
The Reading Mode untrusted renderer handler did not validate the target_tree_id received from the renderer, allowing a compromised renderer to perform actions like click injection or image reading on cross-origin frames within the same tab, bypassing the Same-Origin Policy.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 50 days
Project Fortify, an experimental security project, has identified the following potential security issue.
Overview: The ReadAnythingUntrustedPageHandler does not validate the target_tree_id received from the untrusted Reading Mode renderer. This allows a compromised renderer to perform unauthorized actions (like injecting clicks or reading images) on cross-origin frames within the same tab, bypassing the Same-Origin Policy. The issue stems from passing the unvalidated ID to global lookup functions that lack ownership checks.
Affected files:
chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_page_handler.cccontent/browser/web_contents/web_contents_impl.cc
Estimated timestamp from git blame: 2025-10-22
Description
A potential security vulnerability exists in the Reading Mode implementation where ReadAnythingUntrustedPageHandler fails to validate the target_tree_id received from the chrome-untrusted://read-anything renderer via Mojo. This lack of validation could allow a compromised renderer to perform unauthorized actions on cross-origin subframes within the same tab, effectively bypassing the Same-Origin Policy (SOP).
When Reading Mode is enabled, the ReadAnythingWebContentsObserver enables accessibility for the entire WebContents by creating a scoped accessibility mode. Consequently, the browser sends accessibility updates for every frame in the tab, including cross-origin out-of-process iframes (OOPIFs), to the Reading Mode renderer. These updates include the unguessable ax_tree_id for each frame.
A compromised chrome-untrusted:// renderer can extract these ax_tree_ids and use them in Mojo calls back to the browser. Several handlers in ReadAnythingUntrustedPageHandler, such as OnLinkClicked, OnSelectionChange, ScrollToTargetNode, and OnImageDataRequested, accept a target_tree_id without verifying that it belongs to the main frame or is otherwise authorized for the Reading Mode session.
For example, OnLinkClicked constructs a ui::AXActionData object with the provided target_tree_id and calls PerformActionInTargetTree. This helper performs a global lookup in the ui::AXActionHandlerRegistry (AXActionHandlerRegistry::GetInstance()->GetActionHandler(data.target_tree_id)) and dispatches the action (e.g., kDoDefault for a click). Because the registry is global and no ownership check is performed against the current WebContents, the action is executed in the target frame's context, regardless of origin.
Similarly, OnImageDataRequested passes the unvalidated target_tree_id to WebContentsImpl::DownloadImageFromAxNode. This method globally resolves the frame via RenderFrameHostImpl::FromAXTreeID(tree_id) without verifying that the returned frame belongs to the WebContentsImpl instance on which it was called, allowing the renderer to exfiltrate cross-origin image data.
Potential Impact
If the chrome-untrusted://read-anything renderer is compromised (e.g., via an XSS in its JavaScript handling attacker-controlled accessibility data), an attacker could achieve the following against cross-origin subframes in the same tab:
- Arbitrary Click Injection (CSRF Bypass): By sending
OnLinkClickedwith theax_tree_idandnode_idof an element in a victim iframe, the attacker can trigger a click. This action executes in the context of the victim's origin, utilizing the user's authenticated session cookies to submit forms or click sensitive buttons. - Cross-Origin Image Read: Using
OnImageDataRequested, the attacker can force the browser to download images from cross-origin frames and return the bitmap data to the untrusted renderer.
Hypothetical Attack Scenario
- An attacker hosts a malicious page (
attacker.com) that embeds an iframe pointing to a sensitive page onvictim.com(e.g.,<iframe src='https://victim.com/settings'>). - The user navigates to
attacker.comand opens Reading Mode. - The browser enables accessibility for the entire tab and forwards the accessibility tree updates (including the
ax_tree_idfor thevictim.comiframe) to thechrome-untrusted://read-anythingrenderer. - The attacker compromises the
chrome-untrusted://renderer (e.g., via a renderer exploit or XSS). - The compromised renderer extracts the
victim_tree_idand calls the Mojo methodUntrustedPageHandler::OnLinkClicked(victim_tree_id, button_node_id). - The browser performs a global lookup for the
victim_tree_id, finds theRenderFrameHostImplfor thevictim.comiframe, and dispatches a click action, resulting in a click on a sensitive button with the victim's cookies.
Suggested Fix
In ReadAnythingUntrustedPageHandler, before processing any action involving a target_tree_id (in OnLinkClicked, OnImageDataRequested, ScrollToTargetNode, OnSelectionChange, etc.), validate that the provided target_tree_id belongs to the WebContents being observed by the main_observer_ or pdf_observer_.
This could be achieved by verifying that the RenderFrameHostImpl associated with the target_tree_id is part of the frame tree of the observed WebContents.
Evaluated with Chrome root at commit: bb48272cafb7e24c93f55ef40da398cd206ee651
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. Please feel free to reach out to me if you have concerns or feedback.
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 handler passed an unvalidated frame identifier to global lookup functions that lacked ownership checks against the current WebContents.
Impact
If the Reading Mode renderer is compromised, an attacker could inject clicks into cross-origin frames using the victim's cookies or read cross-origin image data, bypassing the Same-Origin Policy.
What the attacker needed
Victim visits attacker's page; victim opens Reading Mode; attacker compromises the Reading Mode renderer
The fix
The handler should validate that the target_tree_id belongs to the observed WebContents before processing any action.
How it was found
- An attacker hosts a page that embeds an iframe to a sensitive victim page.
- The user visits the attacker's page and opens Reading Mode.
- The browser enables accessibility for the whole tab and sends frame identifiers to the Reading Mode renderer.
- The attacker compromises the Reading Mode renderer (e.g., via XSS).
- The compromised renderer extracts the victim frame's identifier and calls a Mojo method like OnLinkClicked.
- The browser performs a global lookup and dispatches a click action in the victim frame's context.
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.
Reading Mode is a browser feature that shows a simplified view of a page. The code that handles messages from the Reading Mode page did not check which frame an action was meant for, so a malicious page could trick the browser into clicking buttons or reading images from other websites open in the same tab. This breaks a basic security rule that keeps different websites separate.
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.