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

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.cc
  • chrome/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).

  1. Preconditions & Attacker Setup: The user has the Glic Actor feature enabled (kGlicActor and kGlicActorEnableScriptTools are enabled). The attacker establishes a mechanism to navigate a target tab cross-origin. For example, the user visits attacker.com, which opens a popup to a sensitive site like bank.com, retaining a window.opener reference that allows the attacker to manipulate the popup's location.
  2. The user activates the Glic AI Agent in the context of the sensitive bank.com tab.
  3. 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. The ActorTask state transitions to kReflecting.
  4. 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 from bank.com to attacker.com.
  5. The navigation initiates. ActorNavigationThrottle::WillStartOrRedirectRequest (chrome/browser/actor/actor_navigation_throttle.cc) inspects the navigation by calling actor::MayActOnUrl.
  6. Inside actor::MayActOnUrl (chrome/browser/actor/site_policy.cc:347), the origin_gating_cache parameter is passed as std::nullopt. Because of this, the check (!origin_gating_cache || ...) inside MayActOnUrlInternal (chrome/browser/actor/site_policy.cc:264) evaluates to true. The logic short-circuits to decision_wrapper->Accept(), permitting the navigation.
  7. ExecutionEngine::ShouldDeferNavigation (chrome/browser/actor/execution_engine.cc:284) defers the navigation to perform safety checks via HandleNavigationToNewOrigin.
  8. Inside HandleNavigationToNewOrigin (chrome/browser/actor/execution_engine.cc:486), the condition if (!kGlicConfirmNavigationToNewOrigins.Get()) is evaluated. Under default configurations, kGlicConfirmNavigationToNewOrigins is set to false (components/actor/core/actor_features.cc:58-62). The code automatically runs the callback with may_continue=true (execution_engine.cc:503), allowing the navigation to attacker.com to commit.
  9. attacker.com successfully 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).
  10. The server-side AI model completes its processing and returns an optimization_guide::proto::Actions response containing a ScriptToolAction intended for bank.com. This action carries sensitive data in its input_arguments field, but lacks a document_identifier field.
  11. The browser receives the response and GlicActorTaskManager::PerformActions calls actor::BuildToolRequest(actions) (chrome/browser/glic/actor/glic_actor_task_manager.cc:580).
  12. BuildToolRequest processes each action, calling CreateScriptToolRequest(script_tool_action) (chrome/browser/actor/actor_proto_conversion.cc:837).
  13. Inside CreateScriptToolRequest, because action.has_document_identifier() is false, the code falls into the else block to generate a fallback identifier (chrome/browser/actor/actor_proto_conversion.cc:670).
  14. 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 to attacker.com.
  15. CreateScriptToolRequest captures the document token for attacker.com via DocumentIdentifierUserData::GetOrCreateForCurrentDocument(main_rfh)->token() (actor_proto_conversion.cc:672) and binds it as the target_document_id_ of the newly created ScriptToolRequest object.
  16. Following request creation, ActorKeyedService::PerformActions calls ActorTask::Act (chrome/browser/actor/actor_keyed_service.cc:587), which transitions the task state to kActing and calls ExecutionEngine::Act (chrome/browser/actor/actor_task.cc:380).
  17. ExecutionEngine::Act initiates execution through KickOffNextAction() and ExecuteNextAction(), which instantiates ScriptToolHost and ultimately calls ToolController::Invoke after posting tasks across the message loop (chrome/browser/actor/execution_engine.cc).
  18. Immediately prior to invocation, ToolController::Invoke calls ScriptToolHost::TimeOfUseValidation(last_observation) (chrome/browser/actor/tools/tool_controller.cc:198).
  19. ScriptToolHost::TimeOfUseValidation fetches the current primary main frame's document token, stored as primary_document_id (chrome/browser/actor/tools/script_tool_host.cc:93). Since the tab is still at attacker.com, this evaluates to attacker.com's token.
  20. 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 to attacker.com, they are identical (attacker.com_token != attacker.com_token).
  21. The comparison evaluates to false. Furthermore, ScriptToolHost ignores the last_observation parameter (unlike PageTool::TimeOfUseValidation), meaning the document is never compared against the original bank.com observation state. The validation succeeds and returns MakeOkResult() (chrome/browser/actor/tools/script_tool_host.cc:105), bypassing the intended TOCTOU boundary.
  22. Execution proceeds to ScriptToolHost::Invoke, which constructs a ToolInvocation IPC carrying the sensitive input_arguments originally intended for bank.com (chrome/browser/actor/tools/script_tool_host.cc:140).
  23. ScriptToolHost::Invoke calls target_document_render_frame_->InvokeTool(...), dispatching the IPC over mojo to the attacker.com renderer (chrome/browser/actor/tools/script_tool_host.cc:153).
  24. The attacker's registered script tool on attacker.com receives 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 CreateScriptToolRequest combined with ScriptToolHost::TimeOfUseValidation. When the document_identifier is missing from the ScriptToolAction proto, the conversion code in actor_proto_conversion.cc defaults to fetching the current document token of the main frame. Subsequently, ScriptToolHost::TimeOfUseValidation compares this token against the current document token of the main frame, which is always a tautology (X == X) if a navigation committed before CreateScriptToolRequest is called. Unlike PageTool::TimeOfUseValidation, ScriptToolHost does not validate the last_observation token, 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 the ScriptToolAction intended 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 the input_arguments. Code inspection confirms that navigation gating checks (HandleNavigationToNewOrigin) default to allowing the navigation (kGlicConfirmNavigationToNewOrigins is 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, because kGlicActor is 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:671 fetches tab_handle.Get()->GetContents()->GetPrimaryMainFrame() sequentially on request creation, generating a new UnguessableToken uniquely tied to the post-navigation frame.
  • Token Comparison Logic Check: ScriptToolHost::TimeOfUseValidation (script_tool_host.cc:93-97) compares this newly retrieved target_document_id_ with the primary_document_id. The codebase agent confirmed via Task Lifecycle analysis that multiple PostTask asynchronous 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 inherently X == X and succeeds.
  • Navigation Gating Absence Verification: Evaluated ActorNavigationThrottle::WillStartOrRedirectRequest. Determined it calls MayActOnUrl with std::nullopt as the origin_gating_cache. Evaluated MayActOnUrlInternal (site_policy.cc:264) confirming that !origin_gating_cache evaluates to true, causing a short-circuit to decision_wrapper->Accept(). Evaluated kGlicConfirmNavigationToNewOrigins in actor_features.cc:58-62, confirming its default state is indeed false, granting automatic bypass inside ExecutionEngine::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.cc and verified that the last_observation parameter passed to TimeOfUseValidation is never used to validate the frame identity, a critical divergence from PageTool::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.

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 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

  1. The user enables the Glic Actor feature and visits an attacker page that can navigate a popup to a sensitive site.
  2. The user activates the AI agent on the sensitive site, which sends context to the server-side model.
  3. During the model roundtrip, the attacker navigates the target tab to their own origin.
  4. The navigation is allowed because the origin gating cache is absent and the confirmation flag defaults to false.
  5. The attacker page registers a script tool with the same name as the expected action.
  6. 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.

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.