Race condition in Actor (CVE-2026-113041)
A time-of-check to time-of-use flaw in Chrome's Glic ScriptTool pipeline lets an attacker navigate the target tab to their own origin during the AI model's roundtrip. The tool then executes on the attacker's page, leaking sensitive input arguments intended for the original site.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 4 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: When a ScriptToolAction lacks a document identifier, it defaults to capturing the current frame's token at request creation. If the tab navigates during the AI model's roundtrip, TimeOfUseValidation tautologically compares this new token against itself, bypassing security checks. This allows an attacker to execute the tool on a different origin, leaking sensitive input arguments intended for the original page.
Affected files:
chrome/browser/actor/actor_proto_conversion.ccchrome/browser/actor/tools/script_tool_host.cc
Estimated timestamp from git blame: Unknown (Google3 checkout)
1. Summary of the Issue (Meant for Human Triage)
A Time-of-Check to Time-of-Use (TOCTOU) vulnerability exists in the Chrome Glic ScriptTool execution pipeline, potentially leading to a cross-origin data leak. When the AI model generates a ScriptToolAction proto, it currently omits the document_identifier field. During the proto-to-request conversion step (CreateScriptToolRequest), the system compensates for this omission by capturing the document token of whatever document is currently loaded in the target tab's main frame.
Because the AI model's server-side inference involves a multi-second roundtrip, an attacker can navigate the target tab cross-origin during this window. If a navigation commits before CreateScriptToolRequest executes, the fallback logic will capture the attacker's document token. Subsequently, ScriptToolHost::TimeOfUseValidation evaluates this newly generated token against the then-current main frame's token. Because both tokens were captured after the navigation, the validation performs a tautological check (X == X), successfully validating the attacker's document.
Unlike PageTool::TimeOfUseValidation, ScriptToolHost entirely ignores the last_observation parameter, meaning it never compares the target document against the original state observed by the model. Furthermore, default navigation throttles (kGlicConfirmNavigationToNewOrigins = false) permit this cross-origin transition. If the attacker registers a tool with the same name as the intended action, the AI agent's sensitive input_arguments (such as transaction details or PII) will be dispatched to the attacker's page.
2. Proof-of-Concept & Detailed Execution Flow
Below is the step-by-step execution flow detailing how a potential attacker could trigger the vulnerability. (Note: Our tooling agent does not run live code, so these are the theoretically modeled steps based on codebase analysis).
- Preconditions & Attacker Setup: The user has the Glic Actor feature enabled (
kGlicActorandkGlicActorEnableScriptToolsare enabled). The attacker establishes a mechanism to navigate a target tab cross-origin. For example, the user visitsattacker.com, which opens a popup to a sensitive site likebank.com, retaining awindow.openerreference that allows the attacker to manipulate the popup's location. - The user activates the Glic AI Agent in the context of the sensitive
bank.comtab. - The browser gathers context about
bank.com(the observation) and sends it to the server-side AI model to compute the next actions. This network request and model inference takes several seconds. TheActorTaskstate transitions tokReflecting. - During this round-trip window, the attacker executes JavaScript on their page (e.g.,
window.opener.location = "https://attacker.com/") to navigate the target tab frombank.comtoattacker.com. - The navigation initiates.
ActorNavigationThrottle::WillStartOrRedirectRequest(chrome/browser/actor/actor_navigation_throttle.cc) inspects the navigation by callingactor::MayActOnUrl. - Inside
actor::MayActOnUrl(chrome/browser/actor/site_policy.cc:347), theorigin_gating_cacheparameter is passed asstd::nullopt. Because of this, the check(!origin_gating_cache || ...)insideMayActOnUrlInternal(chrome/browser/actor/site_policy.cc:264) evaluates to true. The logic short-circuits todecision_wrapper->Accept(), permitting the navigation. ExecutionEngine::ShouldDeferNavigation(chrome/browser/actor/execution_engine.cc:284) defers the navigation to perform safety checks viaHandleNavigationToNewOrigin.- Inside
HandleNavigationToNewOrigin(chrome/browser/actor/execution_engine.cc:486), the conditionif (!kGlicConfirmNavigationToNewOrigins.Get())is evaluated. Under default configurations,kGlicConfirmNavigationToNewOriginsis set tofalse(components/actor/core/actor_features.cc:58-62). The code automatically runs the callback withmay_continue=true(execution_engine.cc:503), allowing the navigation toattacker.comto commit. attacker.comsuccessfully loads in the target tab. The attacker's page uses the Glic API to register a script tool with the exact name expected to be invoked on the original page (e.g.,transfer).- The server-side AI model completes its processing and returns an
optimization_guide::proto::Actionsresponse containing aScriptToolActionintended forbank.com. This action carries sensitive data in itsinput_argumentsfield, but lacks adocument_identifierfield. - The browser receives the response and
GlicActorTaskManager::PerformActionscallsactor::BuildToolRequest(actions)(chrome/browser/glic/actor/glic_actor_task_manager.cc:580). BuildToolRequestprocesses each action, callingCreateScriptToolRequest(script_tool_action)(chrome/browser/actor/actor_proto_conversion.cc:837).- Inside
CreateScriptToolRequest, becauseaction.has_document_identifier()is false, the code falls into theelseblock to generate a fallback identifier (chrome/browser/actor/actor_proto_conversion.cc:670). - The fallback logic retrieves the current primary main frame of the tab:
auto* main_rfh = tab_handle.Get()->GetContents()->GetPrimaryMainFrame();(actor_proto_conversion.cc:671). Because the navigation committed in Step 8, this frame now belongs toattacker.com. CreateScriptToolRequestcaptures the document token forattacker.comviaDocumentIdentifierUserData::GetOrCreateForCurrentDocument(main_rfh)->token()(actor_proto_conversion.cc:672) and binds it as thetarget_document_id_of the newly createdScriptToolRequestobject.- Following request creation,
ActorKeyedService::PerformActionscallsActorTask::Act(chrome/browser/actor/actor_keyed_service.cc:587), which transitions the task state tokActingand callsExecutionEngine::Act(chrome/browser/actor/actor_task.cc:380). ExecutionEngine::Actinitiates execution throughKickOffNextAction()andExecuteNextAction(), which instantiatesScriptToolHostand ultimately callsToolController::Invokeafter posting tasks across the message loop (chrome/browser/actor/execution_engine.cc).- Immediately prior to invocation,
ToolController::InvokecallsScriptToolHost::TimeOfUseValidation(last_observation)(chrome/browser/actor/tools/tool_controller.cc:198). ScriptToolHost::TimeOfUseValidationfetches the current primary main frame's document token, stored asprimary_document_id(chrome/browser/actor/tools/script_tool_host.cc:93). Since the tab is still atattacker.com, this evaluates toattacker.com's token.- The validation logic checks
if (primary_document_id != target_document_id_)(chrome/browser/actor/tools/script_tool_host.cc:97). Because both tokens were captured after the navigation toattacker.com, they are identical (attacker.com_token != attacker.com_token). - The comparison evaluates to false. Furthermore,
ScriptToolHostignores thelast_observationparameter (unlikePageTool::TimeOfUseValidation), meaning the document is never compared against the originalbank.comobservation state. The validation succeeds and returnsMakeOkResult()(chrome/browser/actor/tools/script_tool_host.cc:105), bypassing the intended TOCTOU boundary. - Execution proceeds to
ScriptToolHost::Invoke, which constructs aToolInvocationIPC carrying the sensitiveinput_argumentsoriginally intended forbank.com(chrome/browser/actor/tools/script_tool_host.cc:140). ScriptToolHost::Invokecallstarget_document_render_frame_->InvokeTool(...), dispatching the IPC over mojo to theattacker.comrenderer (chrome/browser/actor/tools/script_tool_host.cc:153).- The attacker's registered script tool on
attacker.comreceives the invocation, successfully reading and exfiltrating the sensitive data.
Suggested Fix
Remove the else fallback block in CreateScriptToolRequest (chrome/browser/actor/actor_proto_conversion.cc:670-675) and strictly require the proto to specify the correct document identifier. If !action.has_document_identifier() is true, the method should simply return nullptr. Alternatively, if a fallback mechanism is functionally necessary, ScriptToolHost::TimeOfUseValidation must be updated to align with PageTool::TimeOfUseValidation by verifying the target document directly against the last_observation parameter, ensuring the document identity matches the original model input context.
3. Technical Verification Details (Automated Audit Logs)
Prior Critic verdict:
Severity: Medium (S2) Brief Notes / Reasoning: Probability real: 99%, Details correct: 99%, Exploitable: 90%. The vulnerability report correctly identifies a TOCTOU flaw in
CreateScriptToolRequestcombined withScriptToolHost::TimeOfUseValidation. When thedocument_identifieris missing from theScriptToolActionproto, the conversion code inactor_proto_conversion.ccdefaults to fetching the current document token of the main frame. Subsequently,ScriptToolHost::TimeOfUseValidationcompares this token against the current document token of the main frame, which is always a tautology (X == X) if a navigation committed beforeCreateScriptToolRequestis called. UnlikePageTool::TimeOfUseValidation,ScriptToolHostdoes not validate thelast_observationtoken, meaning it entirely fails to verify that the target document is the same one the model originally observed. By navigating the tab during the model's round-trip, an attacker can cause theScriptToolActionintended for the original page (e.g.,bank.com) to be executed on their own origin, leading to a cross-origin data leak of any PII contained in theinput_arguments. Code inspection confirms that navigation gating checks (HandleNavigationToNewOrigin) default to allowing the navigation (kGlicConfirmNavigationToNewOriginsis false). Severity Justification: S2 (Medium). The issue allows an attacker to read cross-origin data generated by the model for a different site. While cross-origin leaks can sometimes be High (S1), the requirement for the user (or an extension) to invoke the AI agent on the target page, combined with the timing requirement of navigating the tab during the model round-trip, makes Medium (S2) the appropriate rating. Per Chrome's severity guidelines, becausekGlicActoris an off-by-default feature without a field trial, we assess the severity as if the flag were enabled (effectively S2, though it carries Security_Impact-None in production today).
Audit Checks Executed & Confirmed:
- Token Retrieval TOCTOU Verification: Codebase Investigator confirmed that
actor_proto_conversion.cc:671fetchestab_handle.Get()->GetContents()->GetPrimaryMainFrame()sequentially on request creation, generating a newUnguessableTokenuniquely tied to the post-navigation frame. - Token Comparison Logic Check:
ScriptToolHost::TimeOfUseValidation(script_tool_host.cc:93-97) compares this newly retrievedtarget_document_id_with theprimary_document_id. The codebase agent confirmed via Task Lifecycle analysis that multiplePostTaskasynchronous boundaries occur between request creation (BuildToolRequest) and tool validation (ToolController::Invoke), confirming the timing gap. However, since the navigation completes before request creation, the validation is inherentlyX == Xand succeeds. - Navigation Gating Absence Verification: Evaluated
ActorNavigationThrottle::WillStartOrRedirectRequest. Determined it callsMayActOnUrlwithstd::nulloptas theorigin_gating_cache. EvaluatedMayActOnUrlInternal(site_policy.cc:264) confirming that!origin_gating_cacheevaluates to true, causing a short-circuit todecision_wrapper->Accept(). EvaluatedkGlicConfirmNavigationToNewOriginsinactor_features.cc:58-62, confirming its default state is indeedfalse, granting automatic bypass insideExecutionEngine::HandleNavigationToNewOrigin. - No Mitigation Found in Actor Controls: Evaluated auxiliary security mechanisms (
SetFocusState,IncrementCapturerCount,ForbidExternalPopupMenus). Codebase Investigator confirmed none of these block JavaScript-driven navigation (e.g.,window.opener.location), ensuring the attacker navigation path is fully unobstructed. - Observation Data Boundary: Codebase Investigator checked
script_tool_host.ccand verified that thelast_observationparameter passed toTimeOfUseValidationis never used to validate the frame identity, a critical divergence fromPageTool::TimeOfUseValidation.
Evaluated with Chrome root at commit: 849d34c7b2ab92513cebb86abb5203390a703eeb
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.
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 fallback that captures the current document token when the action lacks a document identifier, combined with a validation that compares that token to the current frame rather than the original observation.
Impact
An attacker could leak sensitive input arguments, such as transaction details or PII, intended for the original page; the feature is off by default and the report notes the timing and user-invocation requirements.
What the attacker needed
Glic Actor feature enabled; User activates the AI agent on target page; Attacker can navigate the tab cross-origin; Attacker page registers a matching tool name
The fix
The fallback should be removed so a missing document identifier returns null, or validation should compare the target document against the original observation.
How it was found
- The user enables the Glic Actor feature and visits an attacker page that can navigate a popup to a sensitive site.
- The user activates the AI agent on the sensitive site, which sends context to the server-side model.
- During the model roundtrip, the attacker navigates the target tab to their own origin.
- The navigation is allowed because the origin gating cache is absent and the confirmation flag defaults to false.
- The attacker page registers a script tool with the same name as the expected action.
- When the model response arrives, the fallback captures the attacker's document token and validation passes, so the tool runs on the attacker page.
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 an AI assistant in the browser decides to run a tool on a page, it first checks that the page is still the same one it looked at earlier. Here, that check compared the page to itself instead of to the original page, so a page swapped in by an attacker passed. The attacker's page then received private data meant for the real site.
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.