Use after free in Actor (CVE-2026-95345)
A use-after-free was identified in the Glic actor tool execution flow: a synchronous DOM event during tool initialisation can let page JavaScript detach the frame, deleting the ToolExecutor and ToolBase objects. Execution then resumes on the freed objects, which could lead to memory corruption.
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: A potential Use-After-Free (UAF) vulnerability exists in the Glic actor tool execution flow. During tool initialization, a synchronous DOM event can be dispatched, allowing page-controlled JavaScript to run and potentially detach the frame. If the frame is detached, resuming execution on the deleted ToolExecutor and ToolBase objects may cause a use-after-free.
Affected files:
chrome/renderer/actor/tool_executor.ccchrome/renderer/actor/tool_base.cc
Estimated timestamp from git blame: 2026-02-13
Description
A potential Use-After-Free (UAF) vulnerability has been identified in the Glic Actor's tool execution component, specifically within ToolExecutor::InitializeToolImpl (chrome/renderer/actor/tool_executor.cc) and ToolBase::EnsureTargetInView (chrome/renderer/actor/tool_base.cc).
Potential Root Cause
During ToolExecutor::InitializeToolImpl, the code invokes tool_->EnsureTargetInView():
if (tool_->EnsureTargetInView()) {
performed_scroll_into_view_ = true;
}
Within ToolBase::EnsureTargetInView, if a target element's bounds are empty (e.g., because it is wrapped in an element with hidden="until-found"), node.RevealAutoExpandableAncestors() is called. This API dispatches a synchronous beforematch DOM event, transferring control to page-registered JavaScript.
If the page runs a nested event loop or otherwise causes the frame to be detached during this synchronous event, the ChromeRenderFrameObserver is destroyed, which in turn resets tool_executor_ and deletes both the ToolExecutor and its owned ToolBase instance.
Upon returning from the synchronous event call, the code in ToolExecutor::InitializeToolImpl continues execution, accessing members (performed_scroll_into_view_) and calling virtual methods on the deleted tool_ object (tool_->Validate()), which would result in a use-after-free.
Potential Steps to Reproduce (Theoretical)
Note: These are theoretical steps compiled from static analysis; our tooling has not executed this sequence.
- A page registers a
beforematchevent listener on an element withhidden="until-found". - The listener triggers a nested run loop (e.g., via
window.print()). - While the nested loop is running, the parent frame detaches the target iframe.
- Glic actor initialization targets the hidden element, causing
EnsureTargetInViewto invokeRevealAutoExpandableAncestors. - The synchronous
beforematchevent is fired, and during the nested loop, the frame detachment is processed, destroying the Glic actor tools. - Once the nested loop terminates, execution resumes on the freed
ToolExecutorandToolBaseobjects.
Suggested Remediation
To mitigate this issue, use a base::WeakPtr to verify that the ToolExecutor and its associated context remain valid after any synchronous DOM event dispatch.
Example remediation in chrome/renderer/actor/tool_executor.cc:
base::WeakPtr<ToolExecutor> weak_this = weak_ptr_factory_.GetWeakPtr();
bool scroll_requested = tool_->EnsureTargetInView();
if (!weak_this) {
return mojom::InitializeToolResult::NewErrorResult(
MakeResult(mojom::ActionResultCode::kFrameWentAway));
}
if (scroll_requested) {
performed_scroll_into_view_ = true;
}
Evaluated with Chrome root at commit: a2bea94528f4bd6cc57739c43fa3bb890b8367d3
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 code calls a DOM API that can run page JavaScript synchronously and does not re-check that the ToolExecutor and ToolBase objects are still alive afterwards.
Impact
The use-after-free could lead to memory corruption, though the report is theoretical and the sequence has not been executed.
What the attacker needed
Glic actor feature enabled; page with hidden="until-found" element; page JavaScript listener on beforematch; nested event loop to detach frame
The fix
The issue should be fixed by using a base::WeakPtr to check that the ToolExecutor and its context are still valid after any synchronous DOM event dispatch.
How it was found
- A page registers a beforematch event listener on an element with hidden="until-found".
- The listener triggers a nested run loop, for example via window.print().
- While the nested loop runs, the parent frame detaches the target iframe.
- Glic actor initialisation targets the hidden element, so EnsureTargetInView calls RevealAutoExpandableAncestors.
- The synchronous beforematch event fires and the frame detachment destroys the Glic actor tools.
- When the nested loop ends, execution resumes on the freed ToolExecutor and ToolBase objects.
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 a program frees an object but keeps using it, that is a use-after-free: the memory may be reused, so the program reads or writes the wrong data. Here, a web page can trigger a browser event at a moment when the browser is not expecting the page to run code, and that code can cause the browser's internal tool objects to be deleted while still in use.
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.