Skip to content
Memory corruption Advisory Advanced CVE-2026-113162

Use after free in Actor (CVE-2026-113162)

A use-after-free was identified in the renderer's ScriptTool cancellation path, where a synchronous 'toolcancel' DOM event lets JavaScript run and destroy the ScriptTool and its owner during a nested message loop. When execution resumes, the code writes to freed memory, which could potentially lead to arbitrary code execution inside the renderer sandbox.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 5 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 Chrome Security team. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: A Use-After-Free (UAF) vulnerability potentially exists in the renderer process when ScriptTool::Cancel dispatches a synchronous 'toolcancel' DOM event. Malicious JavaScript execution during this event can cause the destruction of the ScriptTool and its owner during a nested message loop, leading to memory corruption when execution resumes.

Affected files:

  • chrome/renderer/actor/script_tool.cc
  • chrome/renderer/actor/tool_executor.cc
  • third_party/blink/renderer/core/script_tools/model_context.cc
  • chrome/renderer/chrome_render_frame_observer.cc

Estimated timestamp from git blame: 2026-02-03

Vulnerability Description

A potential Use-After-Free (UAF) vulnerability has been identified in the actor::ScriptTool and actor::ToolExecutor classes within the renderer process. These classes are part of the Glic 'actor' feature. The issue stems from a synchronous DOM event dispatch in ScriptTool::Cancel() that allows for JavaScript re-entrancy without appropriate liveness guards for the objects on the stack.

Technical Details

When ScriptTool::Cancel() is invoked (e.g., via a cancellation request from the Glic browser UI), it calls into Blink to cancel the script tool execution:

C++
// chrome/renderer/actor/script_tool.cc
void ScriptTool::Cancel() {
  if (!execution_id_.has_value()) {
    return;
  }
  // synchronous call into Blink
  frame_->GetWebFrame()->GetDocument().CancelScriptTool(execution_id_.value());
  execution_id_.reset();   // <--- Potential Use-After-Free write
}

The Blink implementation reaches ModelContext::CancelTool, which dispatches a synchronous kToolcancel event on the LocalDOMWindow:

C++
// third_party/blink/renderer/core/script_tools/model_context.cc
bool ModelContext::CancelTool(const base::UnguessableToken& invocation_id) {
  ...
  if (LocalDOMWindow* window = document_->domWindow()) {
    // Dispatches a synchronous event; allows JS re-entrancy.
    window->DispatchEvent(*WebMCPEvent::Create(event_type_names::kToolcancel, tool_name));
  }
  ...
}

Potential Attack Path

  1. Preparation: An attacker registers a listener for the 'toolcancel' event (e.g., window.addEventListener('toolcancel', ...)).
  2. Triggering the Nested Loop: When the event is dispatched, the listener calls window.print(). This enters a nested message loop inside PrintRenderFrameHelper due to a synchronous Mojo call (ScriptedPrint) which is marked [Sync] in print.mojom.
  3. Frame Destruction: While in the nested loop, the attacker triggers an action (e.g., from a parent frame) that detaches the current RenderFrame. The destruction of the RenderFrame causes ChromeRenderFrameObserver to be deleted via OnDestruct(), which in turn deletes the ToolExecutor and its owned ScriptTool object.
  4. Use-After-Free: When the nested loop finishes and the stack unwinds:
    • ScriptTool::Cancel() resumes and writes execution_id_.reset() to freed memory.
    • ToolExecutor::CancelTool resumes and calls ToolFinished(), which performs multiple writes to its own freed memory, including calling unique_ptr::reset() on the tool_ member.

Impact

This is a heap UAF write in the sandboxed renderer process. The unique_ptr::reset() calls in ToolExecutor provide a strong primitive, as they could potentially trigger a controlled delete of an attacker-chosen pointer if the heap is successfully manipulated. This could lead to arbitrary code execution (RCE) within the renderer sandbox.

Suggested Fix

To mitigate this, ScriptTool and ToolExecutor should use base::WeakPtr to check for liveness after returning from synchronous calls that allow JavaScript execution. Alternatively, the 'toolcancel' event should be dispatched asynchronously, or the cancellation logic should be structured to ensure that member variables are not accessed after the event dispatch without a liveness check.

Note: This analysis was performed using static code review and automated tools; a functional proof-of-concept exploit has not yet been developed.

Evaluated with Chrome root at commit: b3153093eb3c78c3e88ccf562bcbc20437a04b0e


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, a synchronous DOM event dispatch during cancellation allows JavaScript re-entrancy that can destroy the ScriptTool and ToolExecutor objects, and the code then writes to those freed objects without a liveness check.

Impact

This is a heap use-after-free write in the sandboxed renderer process, and the unique_ptr::reset() calls could potentially trigger a controlled delete of an attacker-chosen pointer if the heap is manipulated, which could lead to arbitrary code execution within the renderer sandbox; no functional proof-of-concept has been developed.

What the attacker needed

Glic 'actor' feature enabled; attacker-controlled web page; ability to detach the frame during print

The fix

ScriptTool and ToolExecutor should use base::WeakPtr to check for liveness after synchronous calls that allow JavaScript execution, or the 'toolcancel' event should be dispatched asynchronously.

How it was found

  1. Register a listener for the 'toolcancel' event.
  2. When the event fires, call window.print() to enter a nested message loop.
  3. While in the nested loop, trigger an action that detaches the current RenderFrame.
  4. The frame destruction deletes the ToolExecutor and its ScriptTool.
  5. When the nested loop finishes, ScriptTool::Cancel() writes to freed memory.
  6. ToolExecutor::CancelTool resumes and performs further writes to freed memory.

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.

A use-after-free happens when a program keeps using a piece of memory after it has been freed, so an attacker may be able to control what is written there. Here, a web page event handler can run JavaScript that closes the page while the browser is still in the middle of cancelling a tool, leaving the code pointing at deleted objects. The report is based on reading the code, not on a working exploit.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.